From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I5zvi-0005gI-3V for qemu-devel@nongnu.org; Wed, 04 Jul 2007 04:09:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I5zvf-0005g4-Ub for qemu-devel@nongnu.org; Wed, 04 Jul 2007 04:09:41 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I5zvf-0005g1-Oa for qemu-devel@nongnu.org; Wed, 04 Jul 2007 04:09:39 -0400 Received: from nz-out-0506.google.com ([64.233.162.224]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I5zvf-0003Ou-7O for qemu-devel@nongnu.org; Wed, 04 Jul 2007 04:09:39 -0400 Received: by nz-out-0506.google.com with SMTP id f1so865802nzc for ; Wed, 04 Jul 2007 01:09:38 -0700 (PDT) Message-ID: <83a4d4ca0707040109o242dc1f9s7e5c8c046baf2f6a@mail.gmail.com> Date: Wed, 4 Jul 2007 10:09:36 +0200 From: "Eduardo Felipe" Subject: Re: [Qemu-devel] vnc with german keymap In-Reply-To: <20070704002405.GA26287@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_126890_15601926.1183536576373" References: <20070704002405.GA26287@saturn.kn-bremen.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_126890_15601926.1183536576373 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Some time ago I made a patch to handle keyboard localization for vnc: http://lists.gnu.org/archive/html/qemu-devel/2006-08/msg00129.html It is outdated and most probably won't apply to current CVS, but with some tweaking it can improve things a bit. Regads, Eduardo Felipe 2007/7/4, Juergen Lock : > > Hi! > > I got a report yesterday of -vnc not working right with german > keymaps (I hadn't really played with -vnc yet so I hadn't noticed), > and came up with the following hack: (which still needs -k de, > that just wasn't enough) > > Index: qemu/vnc.c > @@ -763,7 +763,31 @@ > { > int keycode; > > +#if 1 > + /* XXX fixup some de keysyms (use with -k de) */ > + if ((sym & 0xffff) == 0xfe03) /* Alt_Gr -> Alt_R */ > + sym = 0xffea; > + if ((sym & 0xffff) == 0xfe50) /* grave */ > + sym = '`'; > +#if 0 > + if ((sym & 0xffff) == 0xfe51) /* '/acute (gets mixed up with #) */ > + sym = '\''; > +#endif > + if ((sym & 0xffff) == 0xfe52) /* asciicircum */ > + sym = '^'; > + if ((sym & 0xffff) == 0xfe53) /* asciitilde */ > + sym = '~'; > +#endif > keycode = keysym2scancode(vs->kbd_layout, sym & 0xFFFF); > +#if 1 > + /* '/acute key needs special treatment */ > + if (!keycode && (sym & 0xffff) == 0xfe51) /* acute */ > + keycode = 0xd; > +#endif > +#ifdef VNCDEBUGKEYS > + printf("do_key_event down %d, sym 0x%x, keycode 0x%x\n", > + down, (int) sym, keycode); > +#endif > > /* QEMU console switch */ > switch(keycode) { > > I wasn't able to fix this by editing vnc_keysym.h and/or keymaps > because those dont take duplicate definitions, but this is certainly > `somewhat' ugly; anyone care to fix it for real? :) > > Thanx, > Juergen > > > ------=_Part_126890_15601926.1183536576373 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,

Some time ago I made a patch to handle keyboard localization for vnc:

http://lists.gnu.org/archive/html/qemu-devel/2006-08/msg00129.html

It is outdated and most probably won't apply to current CVS, but with some tweaking it can improve things a bit.

Regads,
Eduardo Felipe


2007/7/4, Juergen Lock < nox@jelal.kn-bremen.de>:
Hi!

I got a report yesterday of -vnc not working right with german
keymaps (I hadn't really played with -vnc yet so I hadn't noticed),
and came up with the following hack: (which still needs -k de,
that just wasn't enough)

Index: qemu/vnc.c
@@ -763,7 +763,31 @@
{
     int keycode;

+#if 1
+    /* XXX fixup some de keysyms (use with -k de) */
+    if ((sym & 0xffff) == 0xfe03)    /* Alt_Gr -> Alt_R */
+       sym = 0xffea;
+    if ((sym & 0xffff) == 0xfe50)    /* grave */
+       sym = '`';
+#if 0
+    if ((sym & 0xffff) == 0xfe51)    /* '/acute (gets mixed up with #) */
+       sym = '\'';
+#endif
+    if ((sym & 0xffff) == 0xfe52)    /* asciicircum */
+       sym = '^';
+    if ((sym & 0xffff) == 0xfe53)    /* asciitilde */
+       sym = '~';
+#endif
     keycode = keysym2scancode(vs->kbd_layout, sym & 0xFFFF);
+#if 1
+    /* '/acute key needs special treatment */
+    if (!keycode && (sym & 0xffff) == 0xfe51)    /* acute */
+       keycode = 0xd;
+#endif
+#ifdef VNCDEBUGKEYS
+    printf("do_key_event down %d, sym 0x%x, keycode 0x%x\n",
+       down, (int) sym, keycode);
+#endif

     /* QEMU console switch */
     switch(keycode) {

I wasn't able to fix this by editing vnc_keysym.h and/or keymaps
because those dont take duplicate definitions, but this is certainly
`somewhat' ugly; anyone care to fix it for real? :)

Thanx,
        Juergen



------=_Part_126890_15601926.1183536576373--