Add the raw platform specific key code to SDL_Keysym

This allows applications to handle keys that SDL doesn't recognize, in a platform dependent way.

Fixes https://github.com/libsdl-org/SDL/issues/6390
This commit is contained in:
Sam Lantinga committed 2024-06-21 22:06:08 -07:00
1 parent 9d816c72ef
commit ef9bd8b609
24 files changed
+163 -139

No files matched your search

+2 -2
View File
@@ -330,12 +330,12 @@ static SDL_Scancode TranslateKeycode(int keycode)
int Android_OnKeyDown(int keycode)
{
return SDL_SendKeyboardKey(0, SDL_DEFAULT_KEYBOARD_ID, SDL_PRESSED, TranslateKeycode(keycode));
return SDL_SendKeyboardKey(0, SDL_DEFAULT_KEYBOARD_ID, keycode, TranslateKeycode(keycode), SDL_PRESSED);
}
int Android_OnKeyUp(int keycode)
{
return SDL_SendKeyboardKey(0, SDL_DEFAULT_KEYBOARD_ID, SDL_RELEASED, TranslateKeycode(keycode));
return SDL_SendKeyboardKey(0, SDL_DEFAULT_KEYBOARD_ID, keycode, TranslateKeycode(keycode), SDL_RELEASED);
}
SDL_bool Android_HasScreenKeyboardSupport(SDL_VideoDevice *_this)