kinto icon indicating copy to clipboard operation
kinto copied to clipboard

Expected Command-Tab Behavior using Mac Keyboard on Windows

Open kitschpatrol opened this issue 4 years ago • 6 comments

Hi, thanks for this incredible project.

I tried searching around, but just want to confirm how Command-Tab is supposed to work when using a Mac keyboard with Windows + Kinto.

Expected behavior: Activate app switcher (Natively invoked via Alt-Tab on Windows.)

Observed behavior: Switch windows within foreground app (Natively invoked via Alt-` on Windows, I believe.)

Is the observed behavior intentional, or is there an issue with my setup? I'm fighting Mac muscle memory expecting Command-Tab to invoke the app switcher.

Thank you.

kitschpatrol avatar Mar 19 '21 15:03 kitschpatrol

It should invoke the normal Windows Atl-Tab when you press Cmd-Tab. I know some users may expect or want an exact replica of the macOS app switcher but really I’m just lining up similar functionality.

If it’s not invoking Alt-Tab though when you hit the Cmd-Tab location then that’s a new one for me as I’m not aware of there being an issue w/ that. If you post you kinto.ahk file though I’ll try it out & see what’s going on.

rbreaves avatar Mar 21 '21 03:03 rbreaves

Hi again and thanks for the response.

I ran into this with an unmodified kinto.ahk file, but I neglected to include an important detail that turned out (obviously in hindsight) to be pretty critical: I'm using the Mac keyboard on Windows through Synergy from a Mac host.

After poking around a bit, it looked like GetKeyState was always returning false regardless of the physical state of the modifier keys. So the Alt-Tab code path was never reached, and the default Windows Control-Tab behavior prevailed.

I'm not sure what unholy things Synergy might be doing behind the scenes to cause this, but I found a work-around, and ended up replacing the calls to GetKeyState in kinto.ahk with DllCall("GetAsyncKeyState"....

Works correctly and seems like a fix... but it's an ugly one.

If you think this edge case pops up enough to warrant more effort I can try to clean it up and submit a PR, but seems pretty fringe as there's only one other Synergy-related issue in the archives.

Thanks again for a great project.

kitschpatrol avatar Mar 31 '21 18:03 kitschpatrol

Thanks, and yea I was about to mention that other synergy thread you found. I am glad you found something that worked though and later I will try to find some time to dig into this more. I used to use Synergy and would like to get that working for everyone out of the box - if they so choose to use it.

The Alt-Tab behavior is always the most difficult thing to get working on any platform it seems and has led to more rewrites & refactors of Kinto than any other thing I have encountered thus far.

rbreaves avatar Mar 31 '21 23:03 rbreaves

@kitschpatrol Hi I've just run into the same issue as you. Do you have a copy of the kinto.ahk file you could share? Thanks Isaac

isaac84 avatar May 03 '23 02:05 isaac84

Hi @isaac84, sure I uploaded it to a gist for you: https://gist.github.com/kitschpatrol/c39daf032a11d62a49cd3b20bd21a54c#file-kinto-ahk-L191-L243

Just note that this is a couple years old and likely out of sync with the latest official kinto ahk file.

kitschpatrol avatar May 04 '23 16:05 kitschpatrol

@kitschpatrol thanks for that I will merge your changes into the latest kinto.ahk I have locally.

isaac84 avatar May 04 '23 23:05 isaac84