Received: from eggs.gnu.org ([2001:4830:134:3::10]:59510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBrjK-0003mJ-5n for qemu-devel@nongnu.org; Thu, 15 Jan 2015 16:13:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBrjG-0005jC-VS for qemu-devel@nongnu.org; Thu, 15 Jan 2015 16:13:26 -0500 Received: from mail-qg0-x22f.google.com ([2607:f8b0:400d:c04::22f]:43142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBrjG-0005j4-QK for qemu-devel@nongnu.org; Thu, 15 Jan 2015 16:13:22 -0500 Received: by mail-qg0-f47.google.com with SMTP id j5so178571qga.6 for ; Thu, 15 Jan 2015 13:13:21 -0800 (PST) From: Programmingkid Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Thu, 15 Jan 2015 16:13:18 -0500 Message-Id: <5C3348EC-EC8B-4453-8B78-A7BDAE9FD64F@gmail.com> Mime-Version: 1.0 (Apple Message framework v1084) Subject: [Qemu-devel] [PATCH v2] Fixes key mapping so all keys work List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel qemu-devel Fixes keyboard mapping so right shift, right command, right option, = right control, keypad period, keypad '=3D', keypad enter, and F13 all = work. =20 Signed-off-by: John Arbuckle --- Undid most changes to keyboard map in cocoa.m. Most changes made to keyboard map in adb.c.=20 Since there is no keypad '=3D' key for the PC/AT or PC/XT layouts, I had = to invent my own number for it. It works for the Mac OS X guest. Guest = like Windows XP are not effected because they don't use the Macintosh = keyboard layout. Signed-off-by: John Arbuckle --- hw/input/adb.c | 8 ++++---- ui/cocoa.m | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/input/adb.c b/hw/input/adb.c index 34c8058..aa7287f 100644 --- a/hw/input/adb.c +++ b/hw/input/adb.c @@ -182,12 +182,12 @@ static const uint8_t pc_to_adb_keycode[256] =3D { 84, 85, 82, 65, 0, 0, 10,103,111, 0, 0,110, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 94, 0, 93, 0, 0, 0, 0, 0, 0,104,102, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76,125, 0, 0, + 0, 81, 0, 94, 0, 93, 0, 0, 0, 0, 0, 0,104,102, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 76, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,105, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 75, 0, 0,124, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 75, 0,105, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,115, 62,116, 0, 59, 0, 60, 0,119, - 61,121,114,117, 0, 0, 0, 0, 0, 0, 0, 55,126, 0,127, 0, + 61,121,114,117, 0, 0, 0, 0, 0, 0, 0, 55, 55, 0,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; diff --git a/ui/cocoa.m b/ui/cocoa.m index c8535a3..456f942 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -139,7 +139,7 @@ int keymap[] =3D 157,// 62 0x3E 0x9d E0,1D R CTRL QZ_RCTRL 0, // 63 0x3F Undefined 0, // 64 0x40 Undefined - 0, // 65 0x41 Undefined + 83, // 65 0x41 0x53 KP . QZ_KP_PERIOD 0, // 66 0x42 Undefined 55, // 67 0x43 0x37 KP * QZ_KP_MULTIPLY 0, // 68 0x44 Undefined @@ -155,7 +155,7 @@ int keymap[] =3D 74, // 78 0x4E 0x4a KP - QZ_KP_MINUS 0, // 79 0x4F Undefined 0, // 80 0x50 Undefined - 0, // 81 0x51 QZ_KP_EQUALS + 129,// 81 0x51 0x51 KP =3D QZ_KP_EQUALS 82, // 82 0x52 0x52 KP 0 QZ_KP0 79, // 83 0x53 0x4f KP 1 QZ_KP1 80, // 84 0x54 0x50 KP 2 QZ_KP2 --=20 1.7.5.4