Received: from eggs.gnu.org ([2001:4830:134:3::10]:36978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aftIZ-000450-7g for qemu-devel@nongnu.org; Tue, 15 Mar 2016 14:02:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aftIT-0002qF-Fk for qemu-devel@nongnu.org; Tue, 15 Mar 2016 14:02:27 -0400 Received: from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233]:36693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aftIT-0002pv-BO for qemu-devel@nongnu.org; Tue, 15 Mar 2016 14:02:21 -0400 Received: by mail-io0-x233.google.com with SMTP id z76so33794296iof.3 for ; Tue, 15 Mar 2016 11:02:21 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: Date: Tue, 15 Mar 2016 14:02:18 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: Subject: Re: [Qemu-devel] [PATCH v5 3/4] adb-keys.h: initial commit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel qemu-devel On Mar 15, 2016, at 1:43 PM, Peter Maydell wrote: > On 15 March 2016 at 17:17, Programmingkid = wrote: >> This commit implements the adb-keys.h file. It holds information on = adb keycode >> values. >>=20 >> Signed-off-by: John Arbuckle >> --- >> * v5 changes >> +/* >> + * adb-keys.h >> + * >> + * Provides an enum of all the Macintosh keycodes. >> + * Note: keys like Power, volume related, and eject are handled at = a lower >> + * level and are not available to QEMU. That doesn't mean we = can't >> + * substitute one key for another. The function keys like F1 = make a good >> + * substitute for these keys. This can be done in the GTK, = SDL, or Cocoa >> + * code. >> + * Additional information: = http://www.archive.org/stream/apple-guide-macintosh >> + * = -family-hardware/Apple_Guide_to_the_Macintosh_Family >> + * _Hardware_2e#page/n345/mode/2up - page = 308 >=20 > Better to have the whole URL on one line so you can just cut-n-paste > it into a web browser. It goes against the guidelines, but ok.=20 >=20 >> + ADB_KEY_LEFT_CONTROL =3D 54, >> + ADB_KEY_RIGHT_CONTROL =3D 125, >> + ADB_KEY_LEFT_OPTION =3D 58, >> + ADB_KEY_RIGHT_OPTION =3D 124, >> + ADB_KEY_LEFT_COMMAND =3D 55, >> + ADB_KEY_RIGHT_COMMAND =3D 126, >=20 > Where does this one come from? The Apple doc shows the Extended = Keyboard > as generating the same keycode for left and right command (0x37). I think it came from the old pc_to_adb_keycode array. The xev command in = a linux guess does correctly report that Right Super key is being pushed = when ADB_KEY_RIGHT_COMMAND is set to 126. On a Mac OS guess keyboard = viewer does indicate at least one of the command keys is being pushed. = So this value does work.=