hid: Reset kbd modifiers on reset
PATCH 1/1 hid: Reset kbd modifiers on reset
When resetting the keyboard, we need to reset not just the pending keystrokes, but also any pending modifiers. Otherwise there's a race when we're getting reset while running an escape sequence (modifier 0x100).
Signed-off-by Alexander Graf <[email protected]>
--- hw/input/hid.c | 1 + 1 file changed, 1 insertion(+)
hw/input/hid.c +1 -0
@@ -487,6 +487,7 @@ void hid_reset(HIDState *hs)memset (hs->kbd.keycodes,0 ,sizeof (hs->kbd.keycodes));memset (hs->kbd.key,0 ,sizeof (hs->kbd.key)); hs->kbd.keys =0 ; + hs->kbd.modifiers =0 ;break ;case HID_MOUSE :case HID_TABLET :
Signature · 1 line
1.8.5.6