SYNOPSIS
DESCRIPTION
Reports a typed key on a keyboard or keypad. The parameter codepoint contains the unicode value of the key. Common keyboard processing has been applied, like auto-repeat, uppercase/lowercase, etc.
The scancode value depends on the source reporting the key. For matrix keypads, this is the
index of the key in the lookup table + 0x90000 (HUT 9 = Buttons).
For USB keyboards, this is the USB HID
scancode from the USB standard + 0x70000 (HUT 7 = Keyboard). The lua/scancode.lh defines
these values. Use the SCANCODE(KEY_xxx) macro for processing.
modifiers reports the modifiers keys (e.g. Shift, Ctrl, ...) that where held when the key was typed. This is an integer values whose bits indicate none or more modifiers. The modifiers are defined in the lua/scancode.lh header file as MOD_xxx macros.
NOTES
Callbacks are called from within event:poll().
EXAMPLE
When typing the keys 1, 2, 3 it will print: