File tigervnc-long-press.patch of Package xen.11298
Index: xen-4.5.5-testing/tools/qemu-xen-dir-remote/ui/vnc.c
===================================================================
--- xen-4.5.5-testing.orig/tools/qemu-xen-dir-remote/ui/vnc.c
+++ xen-4.5.5-testing/tools/qemu-xen-dir-remote/ui/vnc.c
@@ -1553,6 +1553,25 @@ static void do_key_event(VncState *vs, i
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