forked from id-Software/Quake-III-Arena
-
-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Map SDL_SCANCODE_GRAVE to the console key.
Currently, the only way to invoke the console which is both platform and layout independent is to use Shift+Escape. This change makes sure the QWERTY '`' key (at the left of the 1 key) works as a console key and for all keyboard layout by matching against its scan code (ie physical location). Since this key can also be mapped to normal characters that could be useful for text input (eg, '^' on German keyboards), we only interpret it as a console key if one of those conditions is respected: - The resulting key is valid and outside ascii range (0x20-0x7f) - The resulting key is '~' or '`' - The console input field is empty and no chat message is being written Additionaly, no modifiers (Shift, Ctrl, Alt, AltGr, Ctrl, Super/Win) shall be pressed to allow usage of the keys in the Shift/AltGr group and to allow bypassing the console (Alt works on X11, Windows key must be used on Windows) A new `cl_consoleUseScanCode` cvar (default 1) is added to enable the feature.
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters