2 ===================================================================
3 --- new.orig/ui/vnc.c 2014-11-20 06:45:06.000000000 +0100
4 +++ new/ui/vnc.c 2014-11-20 06:50:51.000000000 +0100
7 static void do_key_event(VncState *vs, int down, int keycode, int sym)
9 + int mods = keycode & 0xf00;
11 + keycode &= SCANCODE_KEYMASK;
13 /* QEMU console switch */
15 case 0x2a: /* Left Shift */
16 @@ -1712,7 +1716,24 @@
19 if (qemu_console_is_graphic(NULL)) {
21 + /* our java vnc client never sends ALTGR, so we create
22 + an artificial up/down event */
24 + int emul_altgr = (mods & SCANCODE_ALTGR) &&
25 + !vs->modifiers_state[0xb8];
29 + qemu_input_event_send_key_number(vs->vd->dcl.con, 0xb8, true);
32 qemu_input_event_send_key_number(vs->vd->dcl.con, keycode, down);
35 + qemu_input_event_send_key_number(vs->vd->dcl.con, 0xb8, false);
39 bool numlock = vs->modifiers_state[0x45];
40 bool control = (vs->modifiers_state[0x1d] ||
42 lsym = lsym - 'A' + 'a';
45 - keycode = keysym2scancode(vs->vd->kbd_layout, lsym & 0xFFFF) & SCANCODE_KEYMASK;
46 + keycode = keysym2scancode(vs->vd->kbd_layout, lsym & 0xFFFF);
48 trace_vnc_key_event_map(down, sym, keycode, code2name(keycode));
49 do_key_event(vs, down, keycode, sym);
52 char *vnc_display_local_addr(DisplayState *ds)
54 VncDisplay *vs = vnc_display;
57 return vnc_socket_local_addr("%s:%s", vs->lsock);