From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dD6ex-000824-QB for qemu-devel@nongnu.org; Tue, 23 May 2017 06:03:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dD6eu-0006ra-JG for qemu-devel@nongnu.org; Tue, 23 May 2017 06:03:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48010) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dD6eu-0006qv-Cr for qemu-devel@nongnu.org; Tue, 23 May 2017 06:03:20 -0400 Message-ID: <1495533796.30747.2.camel@redhat.com> From: Gerd Hoffmann Date: Tue, 23 May 2017 12:03:16 +0200 In-Reply-To: <20170522180217.18234-1-ianloic@google.com> References: <20170522180217.18234-1-ianloic@google.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/1] Improve Cocoa modifier key handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ian McKellar , qemu-devel@nongnu.org Hi, > looked at the keyCode to determine what modifier key changed. This > usually works fine but sometimes the keyCode is 0 and the app should > instead be looking at the modifierFlags bitmask. Key code 0 is the > 'a' > key. >=20 > I added code that handles keyCode =3D=3D 0 differently. It checks the > modifierFlags and if they differ from QEMU's idea of which modifier > keys are currently pressed it toggles those changed keys. Sounds like this happens in case there is a modifier state change without linked key event, such as state change while qemu did not have the keyboard focus. Nice that macos sends notifications in that case. I'm wondering whenever we should just use modifierFlags all the time. cheers, Gerd