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
This commit is contained in:
1 parent
485ae2eb02
commit
51dabb91b6
1 file changed
+4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user