diff options
author | Andrew Oates <andrew@aoates.org> | 2014-05-23 20:16:09 -0400 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2014-08-05 11:36:31 -0500 |
commit | b203bba0ce2ba575e91f977d762943475e402ab8 (patch) | |
tree | 55633d42fe013945e77d9fa3b3b5e4683394ec81 | |
parent | 91148decd256d4e2f24152fbf2f7c64459e562c1 (diff) |
input (curses): mask keycodes to remove modifier bits
Without the mask, control bits are passed on in the keycode, generating
incorrect PS/2 sequences when SHIFT, ALT, etc are held down.
Cc: qemu-stable@nongnu.org
Signed-off-by: Andrew Oates <andrew@aoates.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit f5c0ab131265270c1e7852ec0d4e284a219d63d4)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r-- | ui/curses.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/curses.c b/ui/curses.c index b044790e43..de85f7610f 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -288,8 +288,8 @@ static void curses_refresh(DisplayChangeListener *dcl) qemu_input_event_send_key_number(NULL, GREY | ALT_CODE, true); } - qemu_input_event_send_key_number(NULL, keycode, true); - qemu_input_event_send_key_number(NULL, keycode, false); + qemu_input_event_send_key_number(NULL, keycode & KEY_MASK, true); + qemu_input_event_send_key_number(NULL, keycode & KEY_MASK, false); if (keycode & ALTGR) { qemu_input_event_send_key_number(NULL, GREY | ALT_CODE, false); |