[Qemu-devel] [PATCH 1/1] Improve Cocoa modifier key handling

2017-05-13 Thread Ian McKellar via Qemu-devel
I had two problems with QEMU on macOS: 1) Sometimes when alt-tabbing to QEMU it would act as if the 'a' key was pressed so I'd get 'a'. 2) Using Sikuli to programatically send keys to the QEMU window text like "foo_bar" would come out as "fooa-bar". They looked similar and af

[Qemu-devel] [PATCH 1/1] Improve Cocoa modifier key handling

2017-05-22 Thread Ian McKellar via Qemu-devel
I had two problems with QEMU on macOS: 1) Sometimes when alt-tabbing to QEMU it would act as if the 'a' key was pressed so I'd get 'a'. 2) Using Sikuli to programatically send keys to the QEMU window text like "foo_bar" would come out as "fooa-bar". They looked similar and af

Re: [Qemu-devel] [PATCH 1/1] Improve Cocoa modifier key handling

2017-05-23 Thread Ian McKellar via Qemu-devel
On Tue, May 23, 2017 at 3:03 AM Gerd Hoffmann wrote: > 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. > Yeah, I guess it makes sens

Re: [Qemu-devel] [PATCH 1/1] Improve Cocoa modifier key handling

2017-05-23 Thread Ian McKellar via Qemu-devel
On Tue, May 23, 2017 at 8:52 AM Ian McKellar wrote: > On Tue, May 23, 2017 at 3:03 AM Gerd Hoffmann wrote: > >> >> I'm wondering whenever we should just use modifierFlags all the time. >> > > Probably. My initial patch tried to be minimally intrusive but I can try > reworking the NSEventTypeFlag

[Qemu-devel] [PATCH] Improve Cocoa modifier key handling

2017-05-26 Thread Ian McKellar via Qemu-devel
I had two problems with QEMU on macOS: 1) Sometimes when alt-tabbing to QEMU it would act as if the 'a' key was pressed so I'd get 'a'. 2) Using Sikuli to programatically send keys to the QEMU window text like "foo_bar" would come out as "fooa-bar". They looked similar and af

Re: [Qemu-devel] [PATCH 1/1] Improve Cocoa modifier key handling

2017-05-26 Thread Ian McKellar via Qemu-devel
Sent another patch that does a better job of toggling caps-lock. I couldn't make it fail with the old patch but I think the new patch is somewhat better. Ian On Tue, May 23, 2017 at 11:17 PM Gerd Hoffmann wrote: > Hi, > > > After a little more experimentation I think that the approach in this