Issue 497: Right-Windows key (aka Right-Super key) now acts as the Meta modifier. Meta modifier is now labelled A (specific graphic) on AROS and Super on all platforms besides OSX which has its own character. Added a few defaults AROS-specific secondary default shortcuts.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2016 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2012-09-28 22:33:10 +00:00
parent 76222af12a
commit 4f74d16982
14 changed files with 68 additions and 11 deletions

View File

@@ -25,6 +25,19 @@
#include "global.h"
#include "keyboard.h"
#if defined(__macosx__)
// Apple's "command" character is not present in the ANSI table, so we
// recycled an ANSI value that doesn't have any displayable character
// associated.
#define META_KEY_PREFIX "\201"
#elif defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
// 'Amiga' key: an outlined uppercase A. Drawn on 2 unused characters.
#define META_KEY_PREFIX "\215\216"
#else
// All other platforms
#define META_KEY_PREFIX "Super+"
#endif
// Table de correspondance des scancode de clavier IBM PC AT vers
// les symboles de touches SDL (sym).
// La correspondance est bonne si le clavier est QWERTY US, ou si
@@ -458,11 +471,7 @@ const char * Key_name(word key)
if (key & MOD_SHIFT)
strcat(buffer, "Shift+");
if (key & MOD_META)
strcat(buffer, "\201");
// Note: Apple's "command" character is not present in the ANSI table, so we
// recycled an ANSI value that doesn't have any displayable character
// associated.
strcat(buffer, META_KEY_PREFIX);
key=key & ~(MOD_CTRL|MOD_ALT|MOD_SHIFT);