diff options
author | Eugene Sandulenko | 2006-06-01 13:57:19 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-06-01 13:57:19 +0000 |
commit | 5a2fde0baa3d73fab898c19fb8b91e66bd0e8655 (patch) | |
tree | 5618b24e5c8bf2f298ebe41c0d05be4fc246e43c /engines/agi | |
parent | 8db54e077bad6e51ef8f686b646bd176850ae821 (diff) | |
download | scummvm-rg350-5a2fde0baa3d73fab898c19fb8b91e66bd0e8655.tar.gz scummvm-rg350-5a2fde0baa3d73fab898c19fb8b91e66bd0e8655.tar.bz2 scummvm-rg350-5a2fde0baa3d73fab898c19fb8b91e66bd0e8655.zip |
Fix keyboard input. Now it is possible to use key modifiers freely.
svn-id: r22818
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/agi.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 7d61aa58b9..b555e93067 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -122,18 +122,11 @@ static void process_events() { break; } - if (event.kbd.flags == OSystem::KBD_CTRL) { + if (event.kbd.flags & OSystem::KBD_CTRL) key_control = 1; - key = 0; - break; - } else if (event.kbd.flags == OSystem::KBD_ALT) { + + if (event.kbd.flags & OSystem::KBD_ALT) key_alt = 1; - key = 0; - break; - } else if (event.kbd.flags == OSystem::KBD_SHIFT) { - key = 0; - break; - } switch (key = event.kbd.keycode) { case 256 + 20: // left arrow @@ -224,12 +217,16 @@ static void process_events() { key = KEY_ENTER; break; default: - if (key < 256 && !isalpha(key)) + if (key < 256 && !isalpha(key)) { + key = event.kbd.ascii; break; + } if (key_control) key = (key & ~0x20) - 0x40; else if (key_alt) key = scancode_table[(key & ~0x20) - 0x41] << 8; + else if (event.kbd.flags & OSystem::KBD_SHIFT) + key = event.kbd.ascii; break; } if (key) |