Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I5tZw-00087T-LP for qemu-devel@nongnu.org; Tue, 03 Jul 2007 21:22:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I5tZu-00085o-Il for qemu-devel@nongnu.org; Tue, 03 Jul 2007 21:22:47 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I5tZu-00085l-G6 for qemu-devel@nongnu.org; Tue, 03 Jul 2007 21:22:46 -0400 Received: from gwyn.kn-bremen.de ([212.63.36.242]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I5tZu-0001UE-47 for qemu-devel@nongnu.org; Tue, 03 Jul 2007 21:22:46 -0400 Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.8/8.13.6) with ESMTP id l640O5ec026619 for ; Wed, 4 Jul 2007 02:24:05 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.8/8.13.6/Submit) id l640O5m1026618 for qemu-devel@nongnu.org; Wed, 4 Jul 2007 02:24:05 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Wed, 4 Jul 2007 02:24:05 +0200 Message-ID: <20070704002405.GA26287@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] vnc with german keymap 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 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