mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-05 22:29:05 +00:00
i_get_event() handled KEYBOARD_PRESS and KEYBOARD_RELEASE and dropped everything else, so every key reported as KEYBOARD_SPECPRESS went nowhere. On the simulator that is already every arrow key, since sim_keyboard reports them that way: the game is unplayable and says nothing about why. Handle all four types. A special key carries a value from enum kbd_keycode_e rather than a character, so it gets its own translation into doomkeys.h and contributes no printable character to the event. The map covers what the game binds by default, which now includes Ctrl, Shift and Alt. Fire, run and strafe are on the modifiers, so a keyboard that reports them is the difference between playing and walking around. Enter needed folding onto KEY_ENTER as well. A driver reports it as the character that it produces, which is the line feed, so it never arrived as KEYCODE_ENTER and never matched the carriage return that the game binds the menu to. Confirmed on hardware with a USB keyboard. Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com> |
||
|---|---|---|
| .. | ||
| brickmatch | ||
| cgol | ||
| match4 | ||
| NXDoom | ||
| snake | ||
| .gitignore | ||
| CMakeLists.txt | ||
| Make.defs | ||
| Makefile | ||