mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-10 03:46:27 +00:00
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:
@@ -205,7 +205,7 @@ int Android_OnPadDown(int device_id, int keycode)
|
||||
if (item && item->joystick) {
|
||||
SDL_SendJoystickButton(timestamp, item->joystick, button, SDL_PRESSED);
|
||||
} else {
|
||||
SDL_SendKeyboardKey(timestamp, SDL_GLOBAL_KEYBOARD_ID, SDL_PRESSED, button_to_scancode(button));
|
||||
SDL_SendKeyboardKey(timestamp, SDL_GLOBAL_KEYBOARD_ID, keycode, button_to_scancode(button), SDL_PRESSED);
|
||||
}
|
||||
SDL_UnlockJoysticks();
|
||||
return 0;
|
||||
@@ -225,7 +225,7 @@ int Android_OnPadUp(int device_id, int keycode)
|
||||
if (item && item->joystick) {
|
||||
SDL_SendJoystickButton(timestamp, item->joystick, button, SDL_RELEASED);
|
||||
} else {
|
||||
SDL_SendKeyboardKey(timestamp, SDL_GLOBAL_KEYBOARD_ID, SDL_RELEASED, button_to_scancode(button));
|
||||
SDL_SendKeyboardKey(timestamp, SDL_GLOBAL_KEYBOARD_ID, keycode, button_to_scancode(button), SDL_RELEASED);
|
||||
}
|
||||
SDL_UnlockJoysticks();
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user