nuttx-apps/games/NXDoom
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
..
pcsound games/NXDoom: Initial port of Chocolate DOOM to NuttX. 2026-06-30 15:22:55 -03:00
src games/NXDoom: handle the special key events 2026-08-02 18:36:37 +08:00
textscreen games/NXDoom: Fix build warnings 2026-07-02 09:08:46 -03:00
.gitignore games/NXDoom: Initial port of Chocolate DOOM to NuttX. 2026-06-30 15:22:55 -03:00
AUTHORS apps/games/NXDoom: Original Chocolate DOOM source 2026-06-30 15:22:55 -03:00
COPYING.md apps/games/NXDoom: Original Chocolate DOOM source 2026-06-30 15:22:55 -03:00
Kconfig games/NXDoom: draw in the pixel format of the frame buffer 2026-07-31 01:07:59 +08:00
Make.defs games/NXDoom: Initial port of Chocolate DOOM to NuttX. 2026-06-30 15:22:55 -03:00
Makefile apps/games/NXDoom: Add support for RTTTL DOOM theme 2026-07-27 13:24:25 -03:00