From b7774b2ed3453fac2aa238bfbe9b491a3095a271 Mon Sep 17 00:00:00 2001 From: bjarni Date: Mon, 6 Sep 2004 20:51:25 +0000 Subject: (svn r168) added a console hotkey on mac --- sdl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sdl.c') 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; } -- cgit v1.2.3-54-g00ecf