diff options
author | Jody Northup | 2009-08-15 09:12:36 +0000 |
---|---|---|
committer | Jody Northup | 2009-08-15 09:12:36 +0000 |
commit | 8d051e24feeb2e7410d7676328ad66fbf04a95c8 (patch) | |
tree | 72cfb648a26fbfb95d54d691bafb767baa3723a8 /backends/keymapper | |
parent | 6ede8310932ab8a79310ebd6b0a14eaf687c1708 (diff) | |
download | scummvm-rg350-8d051e24feeb2e7410d7676328ad66fbf04a95c8.tar.gz scummvm-rg350-8d051e24feeb2e7410d7676328ad66fbf04a95c8.tar.bz2 scummvm-rg350-8d051e24feeb2e7410d7676328ad66fbf04a95c8.zip |
Added support for mapping keys to ctrl, alt, shift, or combinations thereof (though ctrl+alt will never trigger for some reason)
svn-id: r43398
Diffstat (limited to 'backends/keymapper')
-rw-r--r-- | backends/keymapper/keymapper.cpp | 3 | ||||
-rw-r--r-- | backends/keymapper/types.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/backends/keymapper/keymapper.cpp b/backends/keymapper/keymapper.cpp index 24b4d7e5f8..d101e8e0d2 100644 --- a/backends/keymapper/keymapper.cpp +++ b/backends/keymapper/keymapper.cpp @@ -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) { diff --git a/backends/keymapper/types.h b/backends/keymapper/types.h index 004a90bfcd..3cce79ee9a 100644 --- a/backends/keymapper/types.h +++ b/backends/keymapper/types.h @@ -43,7 +43,7 @@ enum KeyType { kTriggerRightKeyType, kStartKeyType, kSelectKeyType, -// kModiferKeyType, + kModiferKeyType, /* ... */ kKeyTypeMax |