Closed Sqvid closed 4 months ago
Keys like KEY_ENTER do not trigger the TEXTINPUT case and therefore do not get added to the input queue. I am happy to submit a PR if one of the maintainers can suggest how to resolve this difference between GLFW and SDL.
I want to point out that the main problem with this is that if someone hits the 'S' key on their keyboard then a lowercase 's' is returned which does not trigger a KEY_S
case statement. The comments in rcore.c
suggest the intended behaviour is that KEY_S
should capture 'S' or 's'. This means only SHIFT+s triggers the case statement.
@Sqvid At the moment I don't know how it can be addressed but both implementations should be consistent and it should also be compatible with previous raylib implementations.
I think a possible solution to this issue is using GetCharPressed()
.
Please, before submitting a new issue verify and check:
Issue description
The SDL platform does not correctly convert SDL_Scancodes to raylib keys in a case-insensitive manner. Additionally non SDL_TEXTINPUT keys do not seem to be added to the input queue.
Environment
Platform: DESKTOP_SDL OS: Linux 6.6.17 OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.3.5 GPU: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics
Issue Screenshot
Code Example
With the following changes to
rcore_desktop_sdl.c
: