mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue