mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-03-12 22:03:49 +00:00
add comments on input
This commit is contained in:
parent
6715003bd8
commit
56a5b4f4d1
1 changed files with 6 additions and 0 deletions
|
@ -523,6 +523,9 @@ void IN_SendKeyEvents (void)
|
|||
#endif
|
||||
#if defined(USE_SDL2)
|
||||
case SDL_TEXTINPUT:
|
||||
// SDL2: We use SDL_TEXTINPUT for typing in the console / chat.
|
||||
// SDL2 uses the local keyboard layout and handles modifiers
|
||||
// (shift for uppercase, etc.) for us.
|
||||
{
|
||||
char *ch;
|
||||
for (ch = event.text.text; *ch != '\0'; ch++)
|
||||
|
@ -554,6 +557,9 @@ void IN_SendKeyEvents (void)
|
|||
/* fallthrough */
|
||||
case SDL_KEYUP:
|
||||
#if defined(USE_SDL2)
|
||||
// SDL2: in gamekey mode, we interpret the keyboard as the US
|
||||
// layout, so keybindings are based on key position, not the label
|
||||
// on the key cap.
|
||||
sym = IN_SDL2_ScancodeToQuakeKey(event.key.keysym.scancode);
|
||||
|
||||
if (gamekey || !IN_SDL2_QuakeKeyHandledAsTextInput(sym))
|
||||
|
|
Loading…
Reference in a new issue