Skip to content

Commit

Permalink
Always map SDL_SCANCODE_GRAVE to the console key.
Browse files Browse the repository at this point in the history
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 ~/`/² key always works as a console key, in
every configuration by matching against its scan code (ie physical
location)
  • Loading branch information
mickael9 committed Apr 5, 2017
1 parent d7a99d5 commit 2df5890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/sdl/sdl_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ static keyNum_t IN_TranslateSDLToQ3Key( SDL_Keysym *keysym, qboolean down )
if( in_keyboardDebug->integer )
IN_PrintKey( keysym, key, down );

if( IN_IsConsoleKey( key, 0 ) )
if( keysym->scancode == SDL_SCANCODE_GRAVE || IN_IsConsoleKey( key, 0 ) )
{
// Console keys can't be bound or generate characters
key = K_CONSOLE;
Expand Down

0 comments on commit 2df5890

Please sign in to comment.