summaryrefslogtreecommitdiff
blob: 771b6265f98893d21c484b2de7221515b71dee91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
diff -rpuN xen-3.0.4_1-src.orig/tools/ioemu/vnc.c xen-3.0.4_1-src/tools/ioemu/vnc.c
--- xen-3.0.4_1-src.orig/tools/ioemu/vnc.c	2007-01-08 07:00:49.000000000 -0800
+++ xen-3.0.4_1-src/tools/ioemu/vnc.c	2007-04-10 16:57:55.000000000 -0700
@@ -113,8 +113,6 @@ struct VncState
     int visible_w;
     int visible_h;
 
-    int ctl_keys;               /* Ctrl+Alt starts calibration */
-    int shift_keys;             /* Shift / CapsLock keys */
     int numlock;
 };
 
@@ -863,9 +861,6 @@ static void press_key(VncState *vs, int 
 
 static void do_key_event(VncState *vs, int down, uint32_t sym)
 {
-    sym &= 0xFFFF;
-
-    if (is_graphic_console()) {
 	int keycode;
 	int numlock;
 
@@ -895,87 +890,6 @@ static void do_key_event(VncState *vs, i
 	    kbd_put_keycode(keycode & 0x7f);
 	else
 	    kbd_put_keycode(keycode | 0x80);
-    } else if (down) {
-	int qemu_keysym = 0;
-
-	if (sym <= 128) { /* normal ascii */
-	    int shifted = vs->shift_keys == 1 || vs->shift_keys == 2;
-	    qemu_keysym = sym;
-	    if (sym >= 'a' && sym <= 'z' && shifted)
-	        qemu_keysym -= 'a' - 'A';
-	} else {
-	    switch (sym) {
-	    case XK_Up: qemu_keysym = QEMU_KEY_UP; break;
-	    case XK_Down: qemu_keysym = QEMU_KEY_DOWN; break;
-	    case XK_Left: qemu_keysym = QEMU_KEY_LEFT; break;
-	    case XK_Right: qemu_keysym = QEMU_KEY_RIGHT; break;
-	    case XK_Home: qemu_keysym = QEMU_KEY_HOME; break;
-	    case XK_End: qemu_keysym = QEMU_KEY_END; break;
-	    case XK_Page_Up: qemu_keysym = QEMU_KEY_PAGEUP; break;
-	    case XK_Page_Down: qemu_keysym = QEMU_KEY_PAGEDOWN; break;
-	    case XK_BackSpace: qemu_keysym = QEMU_KEY_BACKSPACE; break;
-	    case XK_Delete: qemu_keysym = QEMU_KEY_DELETE; break;
-	    case XK_Return:
-	    case XK_Linefeed: qemu_keysym = sym; break;
-	    default: break;
-	    }
-	}
-	if (qemu_keysym != 0)
-	    kbd_put_keysym(qemu_keysym);
-    }
-
-    if (down) {
-	switch (sym) {
-	case XK_Control_L:
-	    vs->ctl_keys |= 1;
-	    break;
-
-	case XK_Alt_L:
-	    vs->ctl_keys |= 2;
-	    break;
-
-	case XK_Shift_L:
-	    vs->shift_keys |= 1;
-	    break;
-
-	default:
-	    break;
-	}
-    } else {
-	switch (sym) {
-	case XK_Control_L:
-	    vs->ctl_keys &= ~1;
-	    break;
-
-	case XK_Alt_L:
-	    vs->ctl_keys &= ~2;
-	    break;
-
-	case XK_Shift_L:
-	    vs->shift_keys &= ~1;
-	    break;
-
-	case XK_Caps_Lock:
-	    vs->shift_keys ^= 2;
-	    break;
-
-	case XK_Num_Lock:
-	    vs->numlock = !vs->numlock;
-	    break;
-
-	case XK_1 ... XK_9:
-	    if ((vs->ctl_keys & 3) != 3)
-		break;
-
-	    console_select(sym - XK_1);
-	    if (is_graphic_console()) {
-		/* tell the vga console to redisplay itself */
-		vga_hw_invalidate();
-		vnc_dpy_update(vs->ds, 0, 0, vs->ds->width, vs->ds->height);
-	    }
-	    break;
-	}
-    }
 }
 
 static void key_event(VncState *vs, int down, uint32_t sym)