mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-01-21 00:40:47 +00:00
ae2d3a7e99
If a key is pressed whichs SDL_Keycode isn't known to Doom3 (has no corresponding K_* constant), its SDL_Scancode is mapped to the corresponding newly added K_SC_* scancode constant. I think I have K_SC_* constants for all keys that differ between keyboard layouts (which is mostly printable characters; F1-F12, Ctrl, Shift, ... should be the same on all layouts, which means that e.g. SDL_SCANCODE_F1 always belongs to SDLK_F1 which the old code already maps to Doom3's K_F1). What's extra nice (IMO) is that when Doom3 requests a *localized* name of the key (like for showing in the bindings menu), we actually use the name of the SDL_Keycode that *currently* belongs to the scancode, and esp. the "Western High-ASCII characters" (ISO-8859-1) supported by Doom3 like Ä or Ñ are displayed correctly. (I already implemented a very similar hack in Yamagi Quake II and reused the list of scancodes) This should fix most of the problems reported in #323 |
||
---|---|---|
.. | ||
aros | ||
cmake | ||
linux | ||
osx | ||
posix | ||
stub | ||
win32 | ||
cpu.cpp | ||
doom_icon.h | ||
events.cpp | ||
glimp.cpp | ||
platform.h | ||
sys_local.cpp | ||
sys_local.h | ||
sys_public.h | ||
threads.cpp |