WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Translate some control characters in the qemu monitor.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Jul 2005 17:04:11 -0400
Delivery-date: Mon, 25 Jul 2005 21:04:36 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Translate some control characters in the qemu monitor., Xen patchbot -unstable <=