From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Puk-00031O-7g for qemu-devel@nongnu.org; Mon, 16 May 2016 17:18:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2Pug-0004B1-DA for qemu-devel@nongnu.org; Mon, 16 May 2016 17:18:57 -0400 Received: from mail-io0-x22d.google.com ([2607:f8b0:4001:c06::22d]:35497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Pug-0004Aw-86 for qemu-devel@nongnu.org; Mon, 16 May 2016 17:18:54 -0400 Received: by mail-io0-x22d.google.com with SMTP id d62so226384715iof.2 for ; Mon, 16 May 2016 14:18:54 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: Date: Mon, 16 May 2016 17:18:50 -0400 Content-Transfer-Encoding: 7bit Message-Id: <62E51AFA-EDC5-430C-82D9-70CDECE856E6@gmail.com> References: <2C310CE8-A8DE-4383-BC90-C4589FCE9D79@gmail.com> <8FAD20F2-8640-4522-8427-46434279C989@gmail.com> Subject: Re: [Qemu-devel] [PATCH v3 3/5] adb.c: correct several key assignments List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Gerd Hoffmann , qemu-devel qemu-devel On May 16, 2016, at 4:48 PM, Peter Maydell wrote: > On 16 May 2016 at 21:42, Programmingkid wrote: >> >> On May 16, 2016, at 2:04 PM, Peter Maydell wrote: >> >>> On 6 May 2016 at 03:37, Programmingkid wrote: >>>> /* ADB_KEY_RIGHT_COMMAND works as right super in Linux */ >>>> /* Use ADB_KEY_LEFT_COMMAND for Mac OS compatibility */ >>>> - [Q_KEY_CODE_META_R] = 0x7e, >>>> + [Q_KEY_CODE_META_R] = ADB_KEY_LEFT_COMMAND, >>> >>> This looks weird. Given that the Apple Extended Keyboard >>> hardware documentation just says that both left and right >>> Command keys return 0x37, we should probably just call >>> the #define ADB_KEY_COMMAND. (That in turn means that the >>> comments are unnecessary and you can just delete them >>> from the patch you put them in.) >> >> I liked the idea of giving someone who might need to tell the >> difference between left and right command keys a way to >> accomplish their goal. > > We're emulating a real bit of hardware here (ie the Apple > Extended Keyboard). If that hardware does not have distinct > left and right command keys then that's what we have to emulate. I think the Apple Extended keyboard could tell the difference between left and right command keys, but Apple just decided not to document this feature. I know the USB keyboards can see the difference and Apple did not document that feature. In the end I suppose it is just easier to have just an ADB_KEY_COMMAND constant.