summaryrefslogtreecommitdiff
path: root/sdl.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2004-09-06 20:51:25 +0000
committerbjarni <bjarni@openttd.org>2004-09-06 20:51:25 +0000
commitb7774b2ed3453fac2aa238bfbe9b491a3095a271 (patch)
tree8dd4e5490454128246dcb8d9ea7bbffcd6b0dd4b /sdl.c
parentd2dd128b0d68d0b388890f8ff36e184b7d52afca (diff)
downloadopenttd-b7774b2ed3453fac2aa238bfbe9b491a3095a271.tar.xz
(svn r168) added a console hotkey on mac
Diffstat (limited to 'sdl.c')
-rw-r--r--sdl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sdl.c b/sdl.c
index 67550ed15..bc10ff8c8 100644
--- a/sdl.c
+++ b/sdl.c
@@ -388,13 +388,20 @@ static uint32 ConvertSdlKeyIntoMy(SDL_keysym *sym)
#if defined(WIN32)
if (sym->scancode == 41) key |= WKC_BACKQUOTE;
#else
- if (sym->scancode == 49) key |= WKC_BACKQUOTE;
+ #if defined(__APPLE__)
+ if (sym->scancode == 10) key |= WKC_BACKQUOTE;
+ #else
+ if (sym->scancode == 49) key |= WKC_BACKQUOTE;
+ #endif
#endif
// META are the command keys on mac
if (sym->mod & KMOD_META) key |= WKC_META;
if (sym->mod & KMOD_SHIFT) key |= WKC_SHIFT;
if (sym->mod & KMOD_CTRL) key |= WKC_CTRL;
if (sym->mod & KMOD_ALT) key |= WKC_ALT;
+ // these two lines really helps porting hotkey combos. Uncomment to use -- Bjarni
+ //printf("scancode character pressed %d\n", sym->scancode);
+ //printf("unicode character pressed %d\n", sym->unicode);
return (key << 16) + sym->unicode;
}