clean: remove buildinfo/changes
[pve-qemu-kvm.git] / debian / patches / old / keymap.diff
blob682cb9bc4c14525cbba1cd80b245cd94e0ecffce
1 Index: new/ui/vnc.c
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
5 @@ -1633,6 +1633,10 @@
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 */
14 switch(keycode) {
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];
27 + if (emul_altgr) {
28 + reset_keys(vs);
29 + qemu_input_event_send_key_number(vs->vd->dcl.con, 0xb8, true);
30 + }
32 qemu_input_event_send_key_number(vs->vd->dcl.con, keycode, down);
34 + if (emul_altgr) {
35 + qemu_input_event_send_key_number(vs->vd->dcl.con, 0xb8, false);
36 + }
38 } else {
39 bool numlock = vs->modifiers_state[0x45];
40 bool control = (vs->modifiers_state[0x1d] ||
41 @@ -1851,7 +1872,8 @@
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);