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>
This commit is contained in:
parent
178ac111bc
commit
f5c0ab1312
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user