sxkb

Sxkb is the Sphinx keyboard driver. It is functionally similar to comboKeyboard in the Object Exchange but, once installed, it occupies no hub memory except for one long used to communicate with the rest of the Propeller. It maintains a queue of up to 15 keystrokes in cog memory.

 

Programs that just want to use sxkb's functionality should use the sxkb interface object, isxkb. Only programs that need to install the sxkb driver, such as sphinx.bin, should use the sxkb object itself. 

Spin interface methods 

Implementation notes

The rendezvous location for sxkb is $7ff8.If no keyboard input is available, the value at the rendezvous remains 0. If keyboard input is available, sxkb stores the next keycode at the rendezvous.

 

A program consuming keyboard input should wait for a non-0 value at the rendezvous, read the non-0 keycode, then clear the rendezvous to 0 so that sxkb can set it to the next keycode.

Sxkb is a moderately modified version of comboKeyboard by Mike Green.