mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-21 01:05:59 +00:00
Added support for mapping keys to ctrl, alt, shift, or combinations thereof (though ctrl+alt will never trigger for some reason)
svn-id: r43398
This commit is contained in:
parent
6ede831093
commit
8d051e24fe
@ -195,12 +195,13 @@ bool Keymapper::mapKey(const KeyState& key, bool keyDown) {
|
||||
// HACK: Temporary fix for modifier recognition, get the hwkey's keystate
|
||||
// to correct for keydown and keyup generating different ascii codes in SDL
|
||||
// to be solved more permanently by using a structure other than KeyState
|
||||
|
||||
const HardwareKey *hwkey = findHardwareKey(key);
|
||||
if (!hwkey)
|
||||
return false;
|
||||
|
||||
KeyState k = hwkey->key;
|
||||
k.flags = key.flags;
|
||||
k.flags = key.flags & hwkey->modMask;
|
||||
|
||||
// Search for key in active keymap stack
|
||||
for (int i = _activeMaps.size() - 1; i >= 0; --i) {
|
||||
|
@ -43,7 +43,7 @@ enum KeyType {
|
||||
kTriggerRightKeyType,
|
||||
kStartKeyType,
|
||||
kSelectKeyType,
|
||||
// kModiferKeyType,
|
||||
kModiferKeyType,
|
||||
/* ... */
|
||||
|
||||
kKeyTypeMax
|
||||
|
@ -163,12 +163,12 @@ static const Key keys[] = {
|
||||
|
||||
|
||||
// Modifier keys pressed alone
|
||||
// {"RSHIFT", KEYCODE_RSHIFT, 0, "Right Shift", kModiferKeyType, ~KBD_SHIFT},
|
||||
// {"LSHIFT", KEYCODE_LSHIFT, 0, "Left Shift", kModiferKeyType, ~KBD_SHIFT},
|
||||
// {"RCTRL", KEYCODE_RCTRL, 0, "Right Ctrl", kModiferKeyType, ~KBD_CTRL},
|
||||
// {"LCTRL", KEYCODE_LCTRL, 0, "Left Ctrl", kModiferKeyType, ~KBD_CTRL},
|
||||
// {"RALT", KEYCODE_RALT, 0, "Right Alt", kModiferKeyType, ~KBD_ALT},
|
||||
// {"LALT", KEYCODE_LALT, 0, "Left Alt", kModiferKeyType, ~KBD_ALT},
|
||||
{"RSHIFT", KEYCODE_RSHIFT, 0, "Right Shift", kModiferKeyType, ~KBD_SHIFT},
|
||||
{"LSHIFT", KEYCODE_LSHIFT, 0, "Left Shift", kModiferKeyType, ~KBD_SHIFT},
|
||||
{"RCTRL", KEYCODE_RCTRL, 0, "Right Ctrl", kModiferKeyType, ~KBD_CTRL},
|
||||
{"LCTRL", KEYCODE_LCTRL, 0, "Left Ctrl", kModiferKeyType, ~KBD_CTRL},
|
||||
{"RALT", KEYCODE_RALT, 0, "Right Alt", kModiferKeyType, ~KBD_ALT},
|
||||
{"LALT", KEYCODE_LALT, 0, "Left Alt", kModiferKeyType, ~KBD_ALT},
|
||||
|
||||
|
||||
// Miscellaneous function keys
|
||||
|
Loading…
x
Reference in New Issue
Block a user