set special case for console key when using native keyboard input

ALWAYS make sure that remains in the same physical place
otherwise things might get very annoying
it already does so with my german layout
This commit is contained in:
Alug committed 2025-10-23 21:01:20 +02:00
1 parent c07502bf5a
commit aa06459c09
1 file changed
+4
+4
View File
@@ -412,6 +412,10 @@ static INT32 GetTypedChar(SDL_Keysym keysym)
break;
}
// Special case for console key
if (scancode == SDL_SCANCODE_GRAVE)
return '`';
if (SDL_PeepEvents(&next_event, 1, SDL_PEEKEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) == 1 && next_event.type == SDL_TEXTINPUT)
{
if (next_event.text.text[1] == '\0') // limit to ASCII