| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | |
| | | /* printf("Scancode %d %d %d\n", keysym.scancode, evt->key_code, evt->key_id); */ |
| | | SDL_SendKeyboardKey_ex(0, SDL_PRESSED, keysym.scancode); |
| | | if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) { |
| | | SDL_zero(text); |
| | | SDL_zeroa(text); |
| | | UnicodeToUtf8(unicode, text); |
| | | if (*text) { |
| | | SDL_SendKeyboardText_ex(0, text); |
| | |
| | | /* printf("Scancode %d %d %d\n", keysym.scancode, evt->key_code, evt->key_id); */ |
| | | SDL_SendKeyboardKey_ex(kbd_idx, SDL_PRESSED, keysym.scancode); |
| | | if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) { |
| | | SDL_zero(text); |
| | | SDL_zeroa(text); |
| | | UnicodeToUtf8(unicode, text); |
| | | if (*text) { |
| | | SDL_SendKeyboardText_ex(kbd_idx, text); |