Win32: fix window keys
This commit is contained in:
parent
9f82984896
commit
b4005cbcb3
@ -38,6 +38,9 @@
|
|||||||
#elif defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
#elif defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||||
// 'Amiga' key: an outlined uppercase A. Drawn on 2 unused characters.
|
// 'Amiga' key: an outlined uppercase A. Drawn on 2 unused characters.
|
||||||
#define META_KEY_PREFIX "\215\216"
|
#define META_KEY_PREFIX "\215\216"
|
||||||
|
#elif defined(WIN32)
|
||||||
|
// Windows Key
|
||||||
|
#define META_KEY_PREFIX "Win+"
|
||||||
#else
|
#else
|
||||||
// All other platforms
|
// All other platforms
|
||||||
#define META_KEY_PREFIX "Super+"
|
#define META_KEY_PREFIX "Super+"
|
||||||
@ -549,7 +552,7 @@ const char * Key_name(word key)
|
|||||||
if (key & MOD_META)
|
if (key & MOD_META)
|
||||||
strcat(buffer, META_KEY_PREFIX);
|
strcat(buffer, META_KEY_PREFIX);
|
||||||
|
|
||||||
key=key & ~(MOD_CTRL|MOD_ALT|MOD_SHIFT);
|
key=key & ~(MOD_CTRL|MOD_ALT|MOD_SHIFT|MOD_META);
|
||||||
|
|
||||||
// 99 is only a sanity check
|
// 99 is only a sanity check
|
||||||
if (key>=KEY_JOYBUTTON && key<=KEY_JOYBUTTON+99)
|
if (key>=KEY_JOYBUTTON && key<=KEY_JOYBUTTON+99)
|
||||||
@ -836,6 +839,8 @@ word Get_Key_modifiers(void)
|
|||||||
mod |= MOD_CTRL;
|
mod |= MOD_CTRL;
|
||||||
if (GetKeyState(VK_MENU) & 0x8000)
|
if (GetKeyState(VK_MENU) & 0x8000)
|
||||||
mod |= MOD_ALT;
|
mod |= MOD_ALT;
|
||||||
|
if ((GetKeyState(VK_LWIN) | GetKeyState(VK_RWIN)) & 0x8000)
|
||||||
|
mod |= MOD_META;
|
||||||
#endif
|
#endif
|
||||||
return mod;
|
return mod;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user