Filtering Keyboard Input

You can install a key filter to interpret the keyboard input. A key filter can reject certain keycodes or translate or map keycodes to other keycodes. You can also use the key filter to count user keystrokes or time stamp keystrokes.

The key filter is called as soon as ki() determines the value of the keycode. Note that the keycode value may have been set by the keyloop function. The keycode is passed to the key filter for processing. The key filter can act on the keycode value or ignore it. If the key filter function returns a zero, ki() will discard the current keycode and begin reading from the keyboard buffer again. If the key filter return value is non-zero, ki() returns this value.

More:

Writing a Key Filter Function

Installing a Key Filter


Home Contents Previous Next