-
-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard shortcuts sometimes stop working (Secure Input) #157
Comments
Hi @stevemartina-salesforce! Thank you for sharing this feedback! It seems to be some kind of OS-level priority about who gets to register the global shortcut. I will say that the current implementation is naive, and exhibits some limitations: #133, #17, #50. I would suggest 2 approaches:
|
Same here
|
I'm on AltTab 3.2.1 now and Catalina 10.15.4, and the issue of not firing seems to occur after my computer wakes from sleep. EDIT: looked through other issues, seems to be related to #176. EDIT 2: I let my computer sleep overnight, and AltTab still works this morning... maybe it's not related to sleep. |
@kungpaogao I tried also to sleep/wake and it didn't stop AltTab from working. I think there is a big lack of clarity as to what behavior is exhibited with this issue. From @stevemartina-salesforce, I understand that he presses the AltTab shortcut, but AltTab doesn't show up. Instead the built-in app-switcher does. Is AltTab opened at this point? I could imagine it crashed for example, which would explain why the built-in app-switcher is showing instead. That wouldn't explain why releasing the @kungpaogao is the above behavior exactly the same for you? Could you elaborate on the symptoms you see? I would really like to understand if AltTab is still running or if it crashed. I tried assigning the same shortcut as the app-switcher, starting/stopping AltTab, sleeping/waking my machine, etc. I also tried binding a global shortcut using System Preferences > Keyboard > Shortcuts after I start AltTab. I wanted to see if maybe the way it works is "last come gets the shortcut". That could explain the issue as the system may sometimes re-grab the global shortcuts for some reason, maybe after a wake, maybe on restart, etc, and that would mean AltTab doesn't respond to it anymore. "Unfortunately", I never got any problems. The shortcut works all the time for me. Update: another possibility is an interaction with the Accessibility permissions. I say that because if restarting AltTab doesn't fix the issue, it may be that the accessibility permission has some issue. Is the app running after restart, or quitting instantly? Is the checkbox there in the System Preferences > Security & Privacy > Privacy? |
Sharing some research: Kentzo/ShortcutRecorder#114 (comment) |
Yah, I'm having a hard time reproducing the bug within the past few days. I'm honestly not sure what triggered it. It occurred on an older version, but then I updated, and maybe it occurred because I had to reset the Accessibility permissions after the new install (which I now have). Best case, it just doesn't occur again :) |
HI @lwlouis,
Sometimes randomly Alt-Tab stops triggering, i.e. it doesn't show up any
more. I can still see it's active in the notification area. Very rarely
closing it from the menu and restarting seems to work, but I haven't
noticed a pattern.
When I close it Alt-Tab works normally as per vanilla MacOS, and when I
start it again most of the time it still doesn't trigger, but releasing Cmd
still fails anyway - I have to press Enter or click on an icon to
dismiss the OOTB switcher.
I'm sorry I can't be more helpful but I'm not much of a MacOS user - I use
linux whenever possible and have to use a MBP for work as it's a company
standard. I don't really know much about the ins and outs of MacOS once
you move away from vanilla *NIX (e.g. I don't know Swift or AppleScript)
Thx -
*Steve Martina*
…On Wed, 1 Apr 2020 at 10:05, lwouis ***@***.***> wrote:
@kungpaogao <https://github.com/kungpaogao> I tried also to sleep/wake
and it didn't stop AltTab from working.
I think there is a big lack of clarity as to what behavior is exhibited
with this issue.
From @stevemartina-salesforce <https://github.com/stevemartina-salesforce>,
I understand that he presses the AltTab shortcut, but AltTab doesn't show
up. Instead the built-in app-switcher does. Is AltTab opened at this point?
I could imagine it crashed for example, which would explain why the
built-in app-switcher is showing instead. That wouldn't explain why
releasing the cmd key fails at that point. That could be a second,
different issue, like AltTab not properly releasing global shortcuts on
crash for example.
@kungpaogao <https://github.com/kungpaogao> is the above behavior exactly
the same for you? Could you elaborate on the symptoms you see? I would
really like to understand if AltTab is still running or if it crashed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#157 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANDR27PZYIZSLKKWCYKAVRLRKLYQZANCNFSM4KS6U36Q>
.
|
@stevemartina-salesforce are you on the latest version now? If not, could you try it, and see if the issue still happens to you? It seems upgrading fixed it for @kungpaogao. Another thing you could do is check in the |
I've just downloaded v3.4.0, it looks great! I think the latest I tried
before this was v3.1.3, I think it wasn't firing at all and I reverted to
the previous known "mostly working" version.
I'll let you know if v3.4.0 exhibits the same odd behaviour. I'll give it
a few weeks and if I don't see it I'll consider the issue fixed.
Thanks for all your work, this is a lifesaver for me...
*Steve Martina*
…On Fri, 3 Apr 2020 at 08:43, lwouis ***@***.***> wrote:
@stevemartina-salesforce <https://github.com/stevemartina-salesforce> are
you on the latest version now? If not, could you try it, and see if the
issue still happens to you? It seems upgrading fixed it for @kungpaogao
<https://github.com/kungpaogao>.
Another thing you could do is check in the System Preferences > Security
& Privacy what's listed, and potentially removing/adding back.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#157 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANDR27M4NOVRVGG22B7FN6TRKWARNANCNFSM4KS6U36Q>
.
|
Hi @stevemartina-salesforce! Do you think we can close this issue now, or have you seen it happen again? |
I was going to ping you to let you know it seemed resolved, but then it
happened again on Thursday. I suspect it might have something to do with
being unplugged / replugged into a docking station? Not sure if it's the
monitor changes or maybe a keyboard being added/removed but it happened
again, and restarting didn't help.
*Steve Martina*
Senior Technical Architect
Commerce Cloud B2C Services | CSG EMEA Services
Mobile: +393429959196
<https://www.salesforce.com>
…On Sun, 3 May 2020 at 17:43, lwouis ***@***.***> wrote:
Hi @stevemartina-salesforce <https://github.com/stevemartina-salesforce>!
Do you think we can close this issue now, or have you seen it happen again?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#157 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANDR27KW5OJFZ7CJRGG63I3RPWGINANCNFSM4KS6U36Q>
.
|
Oh! Dynamically adding/removing keyboards! That's a use-case i haven't explored in depth! It's possible that registering keyboard inputs as we do for the shortcuts is specific to the active keyboard, and that switching to another keyboard means we need to bind again. I'll experiment locally with keyboard, mouse, and display, being added and removed in the middle of using AltTab. I think that may be the root cause, and could affect also mouse and display. Update: I experimented with mouse, keyboard and displays connecting/disconnecting, and AltTab reacts perfectly to all scenarios. |
I just tested with my external bluetooth keyboard and connecting/disconnecting it doesn't affect AltTab at all. Interestingly, I can use AltTab with the built-in macbook pro keyboard, or the external bluetooth keyboard, or both at the same time like holding To recap, things I have explored without reproducing the issue so far:
I'm a bit out of ideas on what could be triggering the issue here. Especially since it persists through AltTab being restarted. One thing that may help: @stevemartina-salesforce could you please try following the instructions I wrote here? There is a link to a debug build of AltTab which logs keyboard events. You could run that build locally, and when it gets stuck next time, open Console.app, press the shortcut, and share here what is printed. |
I've also experiences this, rare but it happens. My unscientific impression was this happened when I was "faster then light" at times switching between windows/apps. Happened also to HyperSwitch countless of times. I'll pay more attention next times about the details. |
I re-read this whole thread here, and to be honest I'm not 100% sure that we are all talking about the same issue. The descriptions given are a bit unclear to be honest. Could you please record using Loom or some other easy to use tool to share video capture of your screen next time a similar issue happens? This way I can review the footage and maybe get a clue at what's happening. Right now I'm pretty much stuck because I have actually never seen it happen, the descriptions are pretty fuzzy as to what the behaviors are, and I tried every step-by-step here to reproduce and it didn't. |
It always happens in the worst possible time where I can't just stop and and analyze it to deep :-( [i.e. during work] Last time, CMD-tab was not recognized at all. Even stopping and starting (!) AltTab did not fix it. Eventually after "some time" it suddenly just worked again (same happened to HyperSwitch I was having run in CMD-~). I did not reboot to fix it, it simply "cured" itself. I know, this is even less then you asked for, sorry! |
@mfn i'm starting to wonder if this issue is related to AltTab. You say that it affects HyperSwitch as well, and most importantly, that it happens when AltTab is not running. When AltTab is not running, there should not be any interaction with the OS. I'm thinking that you may have some keyboard disfunction. Are you using an external keyboard, or is it a built-in macbook keyboard perhaps? On macbooks, there has been lots of talks about defective keyboards for instance. Dust could get stuck behind the keys and prevent them from working properly. Do you think this could be the issue here? This or another global app (I use Karabiner for instance to remap my keyboard) |
Hmm, wait, I didn't say that. Or at least, didn't meant to :) CMD-tab falls back to its default OSX behaviour, using only the built-in app/window switching capabilities. Sorry if this wasn't clear. I.e. closing AltTab and starting it again did not immediately fix it. It just happened to work after "some time" again (minutes, not hours).
External! Connected via USB (2?) via adapter to USB-C
Ah yes, but the key-press it's working, it's just AltTab (and HyperSwitch) not picking it up 😄 |
@mfn It seems to me that the issue you describe is very different from the OP. We may want to make a new ticket to distinguish these. There may even be more than 3, because some of the descriptions here are a bit hard to visualise. Now about your specific case, it's pretty mysterious. It may be a macOS issue where the queue of apps listening has some issue that fixes itself after a few minutes? Pretty much impossible to investigate without more data :/ |
@lwouis First of all, thank for the great app. I see the same behavior as @mfn
|
BREAKING CHANGE: this rework should fix all sorts of issues when OS events happen in parallel: new windows, new apps, user shortcuts, etc. Here are example of use-cases that should work great now, without, and very quickly: * AltTab is open and an app/window is launched/quit * A window is minimized/deminimized, and while the animation is playing, the user invokes AltTab * An app starts and takes a long time to boot (e.g. Gimp) * An app becomes unresponsive, yet AltTab is unaffected and remains interactive while still processing the state of the window while its parent app finally stops being frozen closes #348, closes #157, closes #342, closes #93
BREAKING CHANGE: this rework should fix all sorts of issues when OS events happen in parallel: new windows, new apps, user shortcuts, etc. Here are example of use-cases that should work great now, without, and very quickly: * AltTab is open and an app/window is launched/quit * A window is minimized/deminimized, and while the animation is playing, the user invokes AltTab * An app starts and takes a long time to boot (e.g. Gimp) * An app becomes unresponsive, yet AltTab is unaffected and remains interactive while still processing the state of the window while its parent app finally stops being frozen closes #348, closes #157, closes #342, closes #93
To the best of my knowledge, I'm on the latest:
Thanks, done. Wohoo, dark mode icon 😄 I guess it was too late, I didn't realize this was the SecureInput issue despite running the very command; apologies. I guess I was too tired. In my mind I related |
I have tried several times, with several different apps, and nothing will register the shortcut when assigned. Is there something in OSXs settings I need to change? It's extremely frustrating having different shortcuts between OS's. |
@reifnotreef hard to know what's wrong with your setup without more information. Are you using an external keyboard? Software like Karabiner, Synergy, anything that impacts the keyboard? Could you please see the information in this thread? It may be a similar scenario you're having, where other stuff gets in the way. AltTab itself supports binding to any shortcut. The only exception I know of is if a shortcut is already registered in System Preferences > Keyboard > Shortcuts, which is not the case for |
To anyone interested I've been working on a branch where I rewrote the keyboard handling using another API. It has different pros and cons compared to the current implementation: Pros:
Cons:
I'm not sure what to do now. Should I release this? Maybe I should work on the cons, and figure out some breakthroughs? This stuff is a nightmare to work on btw 🙉 If you're interested, please try out this build and let me know if it works for you. Try it under Secure Input and try it with |
BREAKING CHANGE: the previous keyboard support implementation was not working if any app on the system activated Secure Input and didn't turn it off. This is a major hurdle for most global shortcut apps. This update introduces a new implementation which is unaffected by Secure Input. AltTab shortcuts should now work reliably
Working with this build the whole day without any problems so far. Usually AltTab stopped working because Secure Input quite soon. I'm using it with |
2 things I use are not working well in this version:
|
Edit: I was able to reproduce! This is another consequence of keyboard input being back on the main thread. That's unfortunate. I'll see if I can mitigate this
Edit: Ok I fixed that issue |
BREAKING CHANGE: the previous keyboard support implementation was not working if any app on the system activated Secure Input and didn't turn it off. This is a major hurdle for most global shortcut apps. This update introduces a new implementation which is unaffected by Secure Input. AltTab shortcuts should now work reliably
BREAKING CHANGE: the previous keyboard support implementation was not working if any app on the system activated Secure Input and didn't turn it off. This is a major hurdle for most global shortcut apps. This update introduces a new implementation which is unaffected by Secure Input. AltTab shortcuts should now work reliably
Here is a new build where I fixed both issues. I'll be on vacations for 9 days. Please everyone who can, take that time to test this build: AltTab.app.zip The code is a mess, and I need to reorganize this so it's more approachable, but from my tests, it's looking good. The complexity of keyboard shortcuts being so customizable and combinations of preferences make it really hard to be confident though. That's why I need help with QA 👍 |
BREAKING CHANGE: the previous keyboard support implementation was not working if any app on the system activated Secure Input and didn't turn it off. This is a major hurdle for most global shortcut apps. This update introduces a new implementation which is unaffected by Secure Input. AltTab shortcuts should now work reliably
BREAKING CHANGE: the previous keyboard support implementation was not working if any app on the system activated Secure Input and didn't turn it off. This is a major hurdle for most global shortcut apps. This update introduces a new implementation which is unaffected by Secure Input. AltTab shortcuts should now work reliably
Tested here and both fixes are OK, thanks! |
Another one: when Alt+Tabbing the AltTab Preferences window is not showing itself in the list. |
OK, I'll start using this test build from now until whenever to see if the problem remains or not! |
I've also noticed that the AltTab preferences window does not show up in the switcher when using the test version. Another change: with this version, Cmd-Shift-Tab no longer pops up the regular macOS application switcher as before (I had been using this as a workaround when I wanted to switch by apps). |
# [5.0.0](v4.19.0...v5.0.0) (2020-08-18) ### Bug Fixes * app icon was not showing on macos 10.12 (see [#522](#522)) ([2a45dec](2a45dec)) * battle.net installer and wow were not showing in alt-tab ([793b10b](793b10b)), closes [#536](#536) * portuguese from portugal was shown to brazil users ([e54c2de](e54c2de)) * rare crash when the os was not providing the current space id ([cf05044](cf05044)) * rewrote the preference window to fix crashes and jank (closes [#502](#502)) ([f9f5b8a](f9f5b8a)) ### Features * change default key to select window from `return` to `space` ([eec694e](eec694e)) * complete rewrite of the keyboard support (closes [#157](#157)) ([d3253ba](d3253ba)) * show notification badges on top of app icons (closes [#523](#523)) ([fb62834](fb62834)) * update portuguese (brazil) localization ([726acd3](726acd3)) * updated japanese localization ([36c7b0a](36c7b0a)) ### BREAKING CHANGES * the previous keyboard support implementation was not working if any app on the system activated Secure Input and didn't turn it off. This is a major hurdle for most global shortcut apps. This update introduces a new implementation which is unaffected by Secure Input. AltTab shortcuts should now work reliably
Should we continue testing, or go back to main build? I'm still on this test build and seems to fix it, because I've forgotten about the bug completely. :) |
@mindfulsource I waited a bit, then as everyone reported good results, I merged the PR and closed this ticket. You can go back to the main/public release now |
v2.3.2 often doesn't fire - Alt-Tab invokes the standard MacOS switcher, except releasing the keys doesn't dismiss the dialog. I need to click on an icon or press Enter to dismiss.
Alt keys is Cmd, Tab is 48, theme is MacOS.
MacOS Mojave 10.14.6
Normally restarting Alt-Tab does the trick, but lately it doesn't change anything.
The text was updated successfully, but these errors were encountered: