diff options
author | bjarni <bjarni@openttd.org> | 2004-09-06 20:51:25 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2004-09-06 20:51:25 +0000 |
commit | b7774b2ed3453fac2aa238bfbe9b491a3095a271 (patch) | |
tree | 8dd4e5490454128246dcb8d9ea7bbffcd6b0dd4b | |
parent | d2dd128b0d68d0b388890f8ff36e184b7d52afca (diff) | |
download | openttd-b7774b2ed3453fac2aa238bfbe9b491a3095a271.tar.xz |
(svn r168) added a console hotkey on mac
-rw-r--r-- | sdl.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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; } |