From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FJPkH-0007Xe-Ad for qemu-devel@nongnu.org; Wed, 15 Mar 2006 01:44:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FJPkG-0007WM-4j for qemu-devel@nongnu.org; Wed, 15 Mar 2006 01:44:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJPkF-0007WC-U2 for qemu-devel@nongnu.org; Wed, 15 Mar 2006 01:44:31 -0500 Received: from [211.5.2.73] (helo=nm01omta015.dion.ne.jp) by monty-python.gnu.org with smtp (Exim 4.52) id 1FJPoc-0001IP-At for qemu-devel@nongnu.org; Wed, 15 Mar 2006 01:49:02 -0500 Message-ID: <002401c647fb$ea746da0$0464a8c0@athlon> From: "Kazu" Subject: [Qemu-devel] [PATCH] Japanese keyboard Date: Wed, 15 Mar 2006 15:44:31 +0900 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_001F_01C64847.5A16CF40" 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 This is a multi-part message in MIME format. ------=_NextPart_000_001F_01C64847.5A16CF40 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Hi, Attached is a patch for Japanese keyboard. It is for X Window on Linux. I tested it on Fedora Core 4 host. It has a workaround for SDL bug. Regards, kazu ------=_NextPart_000_001F_01C64847.5A16CF40 Content-Type: application/octet-stream; name="qemu-20060226-keyboard.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="qemu-20060226-keyboard.patch" Index: sdl.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /sources/qemu/qemu/sdl.c,v=0A= retrieving revision 1.23=0A= diff -u -r1.23 sdl.c=0A= --- sdl.c 30 Oct 2005 23:19:10 -0000 1.23=0A= +++ sdl.c 26 Feb 2006 07:14:30 -0000=0A= @@ -92,6 +92,10 @@=0A= keysym =3D ev->keysym.sym;=0A= if (keysym =3D=3D 0 && ev->keysym.scancode =3D=3D 113)=0A= keysym =3D SDLK_MODE;=0A= + /* For Japanese key '\' and '|' */=0A= + if (keysym =3D=3D 92 && ev->keysym.scancode =3D=3D 133) {=0A= + keysym =3D 0xa5;=0A= + }=0A= return keysym2scancode(kbd_layout, keysym);=0A= }=0A= =0A= @@ -106,7 +110,7 @@=0A= =0A= #else=0A= =0A= -static const uint8_t x_keycode_to_pc_keycode[61] =3D {=0A= +static const uint8_t x_keycode_to_pc_keycode[115] =3D {=0A= 0xc7, /* 97 Home */=0A= 0xc8, /* 98 Up */=0A= 0xc9, /* 99 PgUp */=0A= @@ -130,10 +134,10 @@=0A= 0x0, /* 117 */=0A= 0x0, /* 118 */=0A= 0x0, /* 119 */=0A= - 0x70, /* 120 Hiragana_Katakana */=0A= + 0x0, /* 120 */=0A= 0x0, /* 121 */=0A= 0x0, /* 122 */=0A= - 0x73, /* 123 backslash */=0A= + 0x0, /* 123 */=0A= 0x0, /* 124 */=0A= 0x0, /* 125 */=0A= 0x0, /* 126 */=0A= @@ -168,6 +172,24 @@=0A= 0x51, /* 155 KP_PgDn */=0A= 0x52, /* 156 KP_Ins */=0A= 0x53, /* 157 KP_Del */=0A= + 0x0, /* 158 */=0A= + 0x0, /* 159 */=0A= + 0x0, /* 160 */=0A= + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 170 */=0A= + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 180 */=0A= + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 190 */=0A= + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 200 */=0A= + 0x0, /* 201 */=0A= + 0x0, /* 202 */=0A= + 0x0, /* 203 */=0A= + 0x0, /* 204 */=0A= + 0x0, /* 205 */=0A= + 0x0, /* 206 */=0A= + 0x0, /* 207 */=0A= + 0x70, /* 208 Hiragana_Katakana */=0A= + 0x0, /* 209 */=0A= + 0x0, /* 210 */=0A= + 0x73, /* 211 backslash */=0A= };=0A= =0A= static uint8_t sdl_keyevent_to_keycode(const SDL_KeyboardEvent *ev)=0A= @@ -180,7 +202,7 @@=0A= keycode =3D 0;=0A= } else if (keycode < 97) {=0A= keycode -=3D 8; /* just an offset */=0A= - } else if (keycode < 158) {=0A= + } else if (keycode < 212) {=0A= /* use conversion table */=0A= keycode =3D x_keycode_to_pc_keycode[keycode - 97];=0A= } else {=0A= Index: keymaps/ja=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /sources/qemu/qemu/keymaps/ja,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 ja=0A= --- keymaps/ja 12 Dec 2004 16:56:30 -0000 1.1=0A= +++ keymaps/ja 26 Feb 2006 07:14:30 -0000=0A= @@ -97,6 +97,7 @@=0A= Execute 0x54 shift=0A= Kanji 0x70=0A= backslash 0x73=0A= +yen 0x7d=0A= bar 0x7d shift=0A= underscore 0x73 shift=0A= Henkan_Mode 0x79=0A= ------=_NextPart_000_001F_01C64847.5A16CF40--