* [Qemu-devel] [PATCH] hw/display/xenfb: Simulate auto-repeat key events
@ 2017-10-27 20:12 Liang Yan
0 siblings, 0 replies; only message in thread
From: Liang Yan @ 2017-10-27 20:12 UTC (permalink / raw)
To: sstabellini, anthony.perard, xen-devel, qemu-devel; +Cc: qemu-trivial
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.
Signed-off-by: Liang Yan <lyan@suse.com>
---
hw/display/xenfb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index 8e2547ac05..a5f787a3f3 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -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]);
+ }
}
/*
--
2.14.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-27 20:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-27 20:12 [Qemu-devel] [PATCH] hw/display/xenfb: Simulate auto-repeat key events Liang Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).