diff --git a/quakespasm/Quake/in_sdl.c b/quakespasm/Quake/in_sdl.c index 123f45fd..4af9f838 100644 --- a/quakespasm/Quake/in_sdl.c +++ b/quakespasm/Quake/in_sdl.c @@ -478,6 +478,10 @@ void IN_SendKeyEvents (void) case SDLK_LALT: sym = K_ALT; break; + case SDLK_RMETA: + case SDLK_LMETA: + sym = K_COMMAND; + break; case SDLK_NUMLOCK: if (gamekey) sym = K_KP_NUMLOCK; @@ -572,9 +576,10 @@ void IN_SendKeyEvents (void) sym = '~'; break; } - /* If we're not directly handled and still - * above 255, just force it to 0 */ - if (sym > 255) + /* If we are not directly handled and still above 255, + * just force it to 0. kill unsupported international + * characters, too. */ + if (sym > 255 || (sym >= SDLK_WORLD_0 && sym <= SDLK_WORLD_95)) sym = 0; Key_Event (sym, state); break; diff --git a/quakespasm/Quake/keys.c b/quakespasm/Quake/keys.c index 1befac27..d32756d4 100644 --- a/quakespasm/Quake/keys.c +++ b/quakespasm/Quake/keys.c @@ -111,6 +111,8 @@ keyname_t keynames[] = {"HOME", K_HOME}, {"END", K_END}, + {"COMMAND", K_COMMAND}, + {"MOUSE1", K_MOUSE1}, {"MOUSE2", K_MOUSE2}, {"MOUSE3", K_MOUSE3}, @@ -424,7 +426,15 @@ void Key_Console (int key) } } - if ((key=='V' || key=='v') && keydown[K_CTRL]) +#if defined(__MACOSX__) || defined(__MACOS__) + /* Cmd+V paste request for Mac : */ + if (keydown[K_COMMAND] && (key == 'V' || key == 'v')) + { + PasteToConsole(); + return; + } +#endif + if (keydown[K_CTRL] && (key=='V' || key=='v')) { PasteToConsole(); return; diff --git a/quakespasm/Quake/keys.h b/quakespasm/Quake/keys.h index 2398051d..7ca3cbf0 100644 --- a/quakespasm/Quake/keys.h +++ b/quakespasm/Quake/keys.h @@ -78,6 +78,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define K_KP_INS 168 #define K_KP_DEL 169 +#define K_COMMAND 170 + #define K_PAUSE 255 // diff --git a/quakespasm/README.html b/quakespasm/README.html index b35b545a..6216ad60 100644 --- a/quakespasm/README.html +++ b/quakespasm/README.html @@ -177,6 +177,7 @@ these patched libSDL binaries may help.
  • Fixed control-character handling in unicode mode.
  • Made the keypad keys to send separate key events in game mode.
  • Text pasting support from OS clipboard to console. (windows and macosx.)
  • +
  • Support for the Apple (Command) key on macosx.
  • Fixed increased (more than 32) dynamic lights.
  • Music playback: Made sure that the file's channels count is supported.
  • Support for Solaris.
  • @@ -331,7 +332,7 @@ these patched libSDL binaries may help.

    diff --git a/quakespasm/README.sgml b/quakespasm/README.sgml index 314c4aee..60473bb9 100644 --- a/quakespasm/README.sgml +++ b/quakespasm/README.sgml @@ -103,6 +103,7 @@ these patched libSDL binaries may help. Fixed control-character handling in unicode mode. Made the keypad keys to send separate key events in game mode. Text pasting support from OS clipboard to console. (windows and macosx.) + Support for the Apple (Command) key on macosx. Fixed increased (more than 32) dynamic lights. Music playback: Made sure that the file's channels count is supported. Support for Solaris. @@ -236,7 +237,7 @@ these patched libSDL binaries may help. Add uHexen2's first person camera (and menu item) Native CD audio support (if desired). cd_sdl.c doesn't have proper volume controls -Test usb keyboards. Do the keypads work? Make the OSX apple key work. +Test usb keyboards. Complete the unix user directories support diff --git a/quakespasm/README.txt b/quakespasm/README.txt index bc14ad49..93bf262f 100644 --- a/quakespasm/README.txt +++ b/quakespasm/README.txt @@ -168,6 +168,8 @@ o Text pasting support from OS clipboard to console. (windows and macosx.) + o Support for the Apple (Command) key on macosx. + o Fixed increased (more than 32) dynamic lights. o Music playback: Made sure that the file's channels count is @@ -408,8 +410,7 @@ o Native CD audio support (if desired). cd_sdl.c doesn't have proper volume controls - o Test usb keyboards. Do the keypads work? Make the OSX apple key - work. + o Test usb keyboards. o Complete the unix user directories support