2015-11-11 18:04:52 +01:00
|
|
|
Index: xen-4.6.0-testing/tools/qemu-xen-dir-remote/ui/vnc.c
|
2014-09-04 19:09:23 +02:00
|
|
|
===================================================================
|
2015-11-11 18:04:52 +01:00
|
|
|
--- xen-4.6.0-testing.orig/tools/qemu-xen-dir-remote/ui/vnc.c
|
|
|
|
+++ xen-4.6.0-testing/tools/qemu-xen-dir-remote/ui/vnc.c
|
|
|
|
@@ -1659,6 +1659,25 @@ static void do_key_event(VncState *vs, i
|
2014-09-04 19:09:23 +02:00
|
|
|
if (down)
|
|
|
|
vs->modifiers_state[keycode] ^= 1;
|
|
|
|
break;
|
|
|
|
+ default:
|
|
|
|
+ if (qemu_console_is_graphic(NULL)) {
|
|
|
|
+ /* record key 'down' info. Some client like tigervnc
|
|
|
|
+ * will send key down repeatedly if user pressing a
|
|
|
|
+ * a key for long time. In this case, we should add
|
|
|
|
+ * additional key up event before repeated key down,
|
|
|
|
+ * so that it can display the key multiple times.
|
|
|
|
+ */
|
|
|
|
+ if (down) {
|
|
|
|
+ if (vs->modifiers_state[keycode]) {
|
|
|
|
+ /* add a key up event */
|
|
|
|
+ do_key_event(vs, 0, keycode, sym);
|
|
|
|
+ }
|
|
|
|
+ vs->modifiers_state[keycode] = 1;
|
|
|
|
+ } else {
|
|
|
|
+ vs->modifiers_state[keycode] = 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Turn off the lock state sync logic if the client support the led
|