nuttx-apps/games
Jorge Guzman f52bc61adb games/NXDoom: handle the special key events
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>
2026-08-02 18:36:37 +08:00
..
brickmatch games/brickmatch: Add led matrix output option 2025-02-26 11:31:02 -03:00
cgol game: Aligned Cmake with Make 2025-11-14 22:40:17 +08:00
match4 games/match4: Add new match4 game 2025-07-12 08:38:32 -03:00
NXDoom games/NXDoom: handle the special key events 2026-08-02 18:36:37 +08:00
snake games/snake: Change consolekey magic numbers with ASCII macros 2025-07-16 10:32:16 +08:00
.gitignore apps/games: Add shift game 2022-07-31 13:41:43 +03:00
CMakeLists.txt game: Aligned Cmake with Make 2025-11-14 22:40:17 +08:00
Make.defs games: migrate to SPDX identifier 2024-12-19 15:25:28 +08:00
Makefile games: migrate to SPDX identifier 2024-12-19 15:25:28 +08:00