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-devel

[Xen-devel] [PATCH][0/9] Translate some control characters in the qemu m

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][0/9] Translate some control characters in the qemu monitor.
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Mon, 25 Jul 2005 14:00:24 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 25 Jul 2005 20:53:25 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
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 8d9c8ed30b0f -r 1049ab5dc16b tools/ioemu/vnc.c
--- a/tools/ioemu/vnc.c Tue Jul 12 20:46:22 2005
+++ b/tools/ioemu/vnc.c Tue Jul 12 21:49:20 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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][0/9] Translate some control characters in the qemu monitor., Arun Sharma <=