Skip to content
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

Weird Interaction with AltTab on MacOS #858

Closed
blackace72 opened this issue Nov 9, 2021 · 5 comments
Closed

Weird Interaction with AltTab on MacOS #858

blackace72 opened this issue Nov 9, 2021 · 5 comments
Labels
bug Something isn't working MacOS Related to the MacOS operating system RFNR Ready to be shipped in next release

Comments

@blackace72
Copy link

Problem:

I use AltTab for switching windows, with hotkey bound to cmd-tab. Using cmd-tab disables triggering of matches, unless I hit cmd again. Won't even trigger within 20 seconds of writing match. This happens every time I use the hotkey. However, if I switch the hotkey to option-Tab, then the replacement will eventually trigger after ~6 seconds.

Expected behavior:

Immediately trigger replacement when match is written, even after switching windows/apps

Background:

  • OS: MacOS 12.0.1 (MacOS Monterey)
  • espanso: 2.0.5~alpha
  • AltTab: 6.26
  • toggle_key: "RIGHT_ALT"

Workarounds

  • Manually clicking between apps
  • Disable AltTab
  • (partial workaround) Switch AltTab hotkey to option-Tab

What I've noticed:

  • After cmd-tab, persists even when I click on other apps
  • cmd-tab doesn’t fix it (doesn’t reverse the problem)
  • Doesn’t matter how long I wait in between one cmd-tab and another
  • Doesn’t matter how long I wait in between holding cmd and hitting tab
  • Only cmd allows the triggers again (not Esc, control, or option)
  • If I switch the AltTab hotkey to option-Tab, then the cmd-tab problem still persists, but now WILL trigger after a short delay (about 6 seconds);
  • Hitting tab-cmd doesn’t cause problems
  • Hitting control-cmd doesn’t cause problems
  • Hitting option-cmd doesn’t cause problems

Other github problems referenced and tried solutions:

@blackace72
Copy link
Author

blackace72 commented Nov 9, 2021

Update:

Used a different switcher app called Contexts and there is no longer a problem; trigger expands immediately and don't need to hit cmd after each window switch!

@federico-terzi
Copy link
Collaborator

Hey @blackace72,

Thanks for reporting this issue! This issue is very interesting, as fixing this problem might help us on other issues (such as #825). Could you please try reproducing the problem again with the AltTab software and then posting the output of espanso log here?

I'm particularly interested in the logs that are produced when you say "the replacement will eventually trigger after ~6 seconds"

Cheers :)

@federico-terzi federico-terzi added bug Something isn't working MacOS Related to the MacOS operating system labels Nov 10, 2021
@blackace72
Copy link
Author

Log I got from using option-tab on AltTab

01:50:28 [worker(17073)] [
WARN] injection delay has timed out, please release the modifier keys (SHIFT, CTRL, ALT, CMD) to trigger an expansion
01:50:31 [worker(17073)] [WARN] injection delay has timed out, please release the modifier keys (SHIFT, CTRL, ALT, CMD) to trigger an expansion

Another test option-tab:

01:53:07 [worker(17073)] [WARN] 
injection delay has timed out, please release the modifier keys (SHIFT, CTRL, ALT, CMD) to trigger an expansion
01:53:11 [worker(17073)] [WARN] injection delay has timed out, please release the modifier keys (SHIFT, CTRL, ALT, CMD) to trigger an expansion

Even though the logs show about 3-4 seconds, it is actually about 6 seconds of delay (not sure if it helps :))

Also, nothing shows in the log for AltTab using cmd-tab, or Contexts using cmd-tab (I think log is only to find problems?)

@federico-terzi
Copy link
Collaborator

@blackace72 Thanks! That's helpful :)

@federico-terzi
Copy link
Collaborator

Hey @blackace72,

The next version 2.1.0-alpha will include a fix for this problem, thank you for the help! :)

Cheers :)

@federico-terzi federico-terzi added the RFNR Ready to be shipped in next release label Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MacOS Related to the MacOS operating system RFNR Ready to be shipped in next release
Projects
None yet
Development

No branches or pull requests

2 participants