[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Translate some control characters in the qemu monitor.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 5f77050a58f68bcae6b8983e57e0825ebd27ed0b
# Parent  50fd1e053b1a2d9bb4e046f1c34f20dededc0c81

Translate some control characters in the qemu monitor.

This removes odd control characters displayed in the qemu monitor with vnc

Signed-off-by: Edwin Zhain <edwin.zhai@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

diff -r 50fd1e053b1a -r 5f77050a58f6 tools/ioemu/vnc.c
--- a/tools/ioemu/vnc.c Mon Jul 25 20:41:31 2005
+++ b/tools/ioemu/vnc.c Mon Jul 25 21:00:30 2005
@@ -393,7 +393,28 @@
                        keycode>>=8;
                }
        } else if(down) {
-               kbd_put_keysym(keySym);
+            int qemu_keysym = 0;
+            if (keySym <= 128) { /* normal ascii */
+                qemu_keysym = keySym;
+            } else {
+                switch(keySym) {
+                    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 = keySym; break;
+                    default: break;
+                }
+            }
+            if (qemu_keysym != 0)
+                kbd_put_keysym(qemu_keysym);
        }
        if(down) {
                if(keySym==XK_Control_L)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.