* [Qemu-trivial] [PATCH] hw/display/xenfb: Simulate auto-repeat key events
@ 2017-10-27 20:12 ` Liang Yan
0 siblings, 0 replies; 3+ messages 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] 3+ messages in thread
* [Qemu-devel] [PATCH] hw/display/xenfb: Simulate auto-repeat key events
@ 2017-10-27 20:12 ` Liang Yan
0 siblings, 0 replies; 3+ messages 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] 3+ messages in thread
* [PATCH] hw/display/xenfb: Simulate auto-repeat key events
@ 2017-10-27 20:12 ` Liang Yan
0 siblings, 0 replies; 3+ messages 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
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-27 20:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-27 20:12 [Qemu-trivial] [PATCH] hw/display/xenfb: Simulate auto-repeat key events Liang Yan
2017-10-27 20:12 ` Liang Yan
2017-10-27 20:12 ` [Qemu-devel] " Liang Yan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.