qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] vnc with german keymap


From: Eduardo Felipe
Subject: Re: [Qemu-devel] vnc with german keymap
Date: Wed, 4 Jul 2007 10:09:36 +0200

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 < address@hidden>:
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]