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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -620,7 +620,12 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = {
"",
true,
SDLK_b, // B
0},
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
SDLK_C|MOD_META // Right-Amiga + C
#else
0
#endif
},
{68,
"\"Lasso\" brush grabbing",
"Allows you to pick a brush defined",
@ -844,7 +849,12 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = {
"path-name.",
true,
SDLK_F2, // F2
0},
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
SDLK_A|MOD_META // Right-Amiga + A
#else
0
#endif
},
{96,
"Save picture",
"Saves your picture with the last",
@ -852,7 +862,12 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = {
"",
true,
SDLK_F2|MOD_SHIFT, // Shift + F2
0},
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
SDLK_S|MOD_META // Right-Amiga + S
#else
0
#endif
},
{97,
"Load picture",
"Opens a file-selector that allows",
@ -860,7 +875,12 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = {
"",
true,
SDLK_F3, // F3
0},
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
SDLK_O|MOD_META // Right-Amiga + O
#else
0
#endif
},
{98,
"Re-load picture",
"Re-load the current picture. This",
@ -905,6 +925,8 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = {
(KEY_JOYBUTTON+JOY_BUTTON_I)
#elif defined (__WIZ__)
(KEY_JOYBUTTON+JOY_BUTTON_L)
#elif defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
SDLK_Z|MOD_META // Right-Amiga + Z
#else
0
#endif
@ -963,6 +985,8 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = {
(KEY_JOYBUTTON+JOY_BUTTON_HOME)
#elif defined (__WIZ__)
(KEY_JOYBUTTON+JOY_BUTTON_MENU)
#eif defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
SDLK_Q|MOD_META // Right-Amiga + Q
#else
0
#endif

View File

@ -38,6 +38,16 @@
#include "input.h"
#include "loadsave.h"
#define RSUPER_EMULATES_META_MOD
// Keyboards with a Super key never seem to have a Meta key at the same time.
// This setting allows the right 'Super' key (the one with a 'Windows' or
// 'Amiga' label to be used as a modifier instead of a normal key.
// This feature is especially useful for AROS where applications should use
// generic defaults like "Right Amiga+Q = Quit".
// In case this is annoying for some platforms, disable it.
#endif
void Handle_window_resize(SDL_ResizeEvent event);
void Handle_window_exit(SDL_QuitEvent event);
int Color_cycling(void);
@ -410,6 +420,13 @@ int Handle_key_press(SDL_KeyboardEvent event)
return Move_cursor_with_constraints();
}
}
#ifdef RSUPER_EMULATES_META_MOD
if (Key==SDLK_RSUPER)
{
SDL_SetModState(SDL_GetModState() | KMOD_META);
Key=0;
}
#endif
if(Is_shortcut(Key,SPECIAL_MOUSE_UP))
{
@ -548,6 +565,13 @@ int Handle_key_release(SDL_KeyboardEvent event)
modifier=MOD_ALT;
break;
#ifdef RSUPER_EMULATES_META_MOD
case SDLK_RSUPER:
SDL_SetModState(SDL_GetModState() & ~KMOD_META);
modifier=MOD_META;
break;
#endif
case SDLK_RMETA:
case SDLK_LMETA:
modifier=MOD_META;

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);