Skip to contentSkip to conversation

hw/display/xenfb: Simulate auto-repeat key events

PATCH Superseded Liang Yan 1 participant 1 message Oct 27, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Liang Yan

author
#0 lore raw

PATCH 1/1 hw/display/xenfb: Simulate auto-repeat key events

New tigervnc server changes the way to send long pressed key, from "down up down up ..." to "down down ... up". So we insert an up event after each key down event to simulate auto-repeat key events for xen keyboard frontend driver.

---
 hw/display/xenfb.c | 3 +++
 1 file changed, 3 insertions(+)
hw/display/xenfb.c +3 -0
index 8e2547ac05..a5f787a3f3 100644
@@ -292,6 +292,9 @@ static void xenfb_key_event(void *opaque, int scancode)
     }
     trace_xenfb_key_event(opaque, scancode2linux[scancode], down);
     xenfb_send_key(xenfb, down, scancode2linux[scancode]);
+    if (down) { /* simulate auto-repeat key events */
+    xenfb_send_key(xenfb, 0, scancode2linux[scancode]);
+    }
 }
 
 /*
Signature · 7 lines
2.14.2


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel