From 51dabb91b6e26aa3bf00fb069a44335a109d7cc1 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 1 Oct 2025 14:28:19 +0200 Subject: [PATCH] add special case for "tilde" console key for native layout not sure if to put this into main but i wanna be able to close the console with the same key i opened it --- src/sdl/i_video.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 876a9e215..6099b60a1 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -416,6 +416,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