mirror of
https://github.com/apache/nuttx.git
synced 2026-08-18 19:50:47 +08:00
The matrix driver reported every key with KEYBOARD_PRESS and KEYBOARD_RELEASE, so a board whose matrix has arrows or function keys had no way to say so: the keycode ranges overlap the character range, and the event type is what tells them apart. A keymap entry is a uint32_t, so wrap the entry in KMATRIX_SPECIAL() to declare that it holds a value from enum kbd_keycode_e. Existing keymaps hold characters and are unaffected. While here, drop the cast that truncated the keycode to sixteen bits, and default the device to /dev/kbd0. Applications look for a keyboard under that name, and /dev/keypad0 kept the matrix out of reach of every one of them. Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>