Use SDL_GetKeyFromScancode instead of SDL_EVENT_TEXT_INPUT for keychar#2887
Use SDL_GetKeyFromScancode instead of SDL_EVENT_TEXT_INPUT for keychar#2887riccardobl wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a call to SDL_SetHint(SDL_HINT_MAC_PRESS_AND_HOLD, "0") in LwjglWindow.java before initializing the SDL subsystem. This change disables the macOS "press and hold" feature for character accents, allowing standard key repeat behavior. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors keyboard input handling in SdlKeyInput.java by removing SDL text input event handling (SDL_StartTextInput, SDL_StopTextInput, and SDL_EVENT_TEXT_INPUT). Instead, it now resolves key characters directly from scancodes and modifiers using SDL_GetKeyFromScancode during standard key events. There are no review comments, so I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
SDL_StartTextInputstarts the IME in some environments (eg. macOs or KDE6+) making the engine behavior undefined, some IMEs might open little popups (eg. for accent selection), some might just consume the inputs entirely.This PR fixes the issue by making the engine use
SDL_GetKeyFromScancodeinstead ofSDL_EVENT_TEXT_INPUTfromSDL_StartTextInput.