# HG changeset patch # User dominik # Date 1093348410 0 # Node ID df1a60bc0d701f7ccfae4679bd4a61547afb957b # Parent 28ebd80f65218f5c47f407ef7ced3d9b8477f584 (svn r130) Change: hotkey for console is Backquote (the key left to '1', regardless of keyboard layout diff -r 28ebd80f6521 -r df1a60bc0d70 console.c --- a/console.c Tue Aug 24 09:15:09 2004 +0000 +++ b/console.c Tue Aug 24 11:53:30 2004 +0000 @@ -108,7 +108,7 @@ case WE_KEYPRESS: e->keypress.cont=false; - if (e->keypress.keycode == WKC_TAB) + if (e->keypress.keycode == WKC_BACKQUOTE) { IConsoleSwitch(); } else diff -r 28ebd80f6521 -r df1a60bc0d70 intro_gui.c --- a/intro_gui.c Tue Aug 24 09:15:09 2004 +0000 +++ b/intro_gui.c Tue Aug 24 11:53:30 2004 +0000 @@ -6,7 +6,7 @@ #include "viewport.h" #include "gfx.h" #include "player.h" -#include "command.h" +#include "command.h" #include "console.h" extern void MakeNewGame(); @@ -70,11 +70,11 @@ case 12: case 13: case 14: case 15: DoCommandP(0, e->click.widget - 12, 0, NULL, CMD_SET_NEW_LANDSCAPE_TYPE); break; - } - case WE_KEYPRESS: - switch(e->keypress.keycode) { - case WKC_TAB: IConsoleSwitch(); break; - } + } + case WE_KEYPRESS: + switch(e->keypress.keycode) { + case WKC_BACKQUOTE: IConsoleSwitch(); break; + } break; } } diff -r 28ebd80f6521 -r df1a60bc0d70 sdl.c --- a/sdl.c Tue Aug 24 09:15:09 2004 +0000 +++ b/sdl.c Tue Aug 24 11:53:30 2004 +0000 @@ -344,8 +344,6 @@ AM(SDLK_a,SDLK_z,'A','Z'), AM(SDLK_0,SDLK_9,'0','9'), - AS(SDLK_AMPERSAND, WKC_AMPERSAND), // mainly for french keyboards - AS(SDLK_ESCAPE, WKC_ESC), AS(SDLK_BACKSPACE, WKC_BACKSPACE), @@ -385,6 +383,9 @@ break; } } + + // check scancode for BACKQUOTE key, because we want the key left of "1", not anything else (on non-US keyboards) + if (sym->scancode == 49) key |= WKC_BACKQUOTE; // META are the command keys on mac if (sym->mod & KMOD_META) key |= WKC_META; diff -r 28ebd80f6521 -r df1a60bc0d70 window.h --- a/window.h Tue Aug 24 09:15:09 2004 +0000 +++ b/window.h Tue Aug 24 11:53:30 2004 +0000 @@ -124,8 +124,10 @@ WKC_F11 = 43, WKC_F12 = 44, - // Required for french keyboard - WKC_AMPERSAND = 45, + // backquote is the key left of "1" + // we only store this key here, no matter what character is really mapped to it + // on a particular keyboard. (US keyboard: ` and ~ ; German keyboard: ^ and °) + WKC_BACKQUOTE = 45, // 0-9 are mapped to 48-57 // A-Z are mapped to 65-90