|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [QEMU] Do shift-key processing in QEMU mo
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 582d21e2d3cd12a13ad4debee9af8bb0f1be413a
# Parent b7095209e31ae1f52cd4b196225a360543e37a80
[QEMU] Do shift-key processing in QEMU monitor terminal when connected via VNC.
Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
tools/ioemu/vnc.c | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff -r b7095209e31a -r 582d21e2d3cd tools/ioemu/vnc.c
--- a/tools/ioemu/vnc.c Thu Nov 30 17:36:03 2006 +0000
+++ b/tools/ioemu/vnc.c Thu Nov 30 17:47:50 2006 +0000
@@ -114,6 +114,7 @@ struct VncState
int visible_h;
int ctl_keys; /* Ctrl+Alt starts calibration */
+ int shift_keys; /* Shift / CapsLock keys */
};
#define DIRTY_PIXEL_BITS 64
@@ -870,9 +871,12 @@ static void do_key_event(VncState *vs, i
} else if (down) {
int qemu_keysym = 0;
- if (sym <= 128) /* normal ascii */
+ if (sym <= 128) { /* normal ascii */
+ int shifted = vs->shift_keys == 1 || vs->shift_keys == 2;
qemu_keysym = sym;
- else {
+ 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;
@@ -903,6 +907,10 @@ static void do_key_event(VncState *vs, i
vs->ctl_keys |= 2;
break;
+ case XK_Shift_L:
+ vs->shift_keys |= 1;
+ break;
+
default:
break;
}
@@ -914,6 +922,14 @@ static void do_key_event(VncState *vs, i
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_1 ... XK_9:
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [QEMU] Do shift-key processing in QEMU monitor terminal when connected via VNC.,
Xen patchbot-unstable <=
|
|
|
|
|