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] [xen-unstable] [QEMU] Do shift-key processing in QEMU mo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [QEMU] Do shift-key processing in QEMU monitor terminal when connected via VNC.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 30 Nov 2006 21:30:52 +0000
Delivery-date: Thu, 30 Nov 2006 13:32:37 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 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 <=