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

After opening AltTab, it seems like the Next Window shortcut is held or pressed a few times without the user doing anything #3117

Open
SamadiPour opened this issue Jan 19, 2024 · 107 comments
Labels
bug Something isn't working unreproducible Need help from the author to reproduce the issue

Comments

@SamadiPour
Copy link

Describe the bug

Since a few weeks ago, I have been experiencing drifting when the mouse is hovered over an item. It only happens when the mouse is over an item, and not when it's inside or outside of the frame.
When I hold down the Command key and press Tab once (push and release instantly), the selector drifts through the items, sometimes until it reaches the mouse and sometimes until it reaches the end.
The Mouse hover option under Also select windows using is disabled.

Screenshots / video

Screenshot.2024-01-19-jK5O4SMZ1.mp4

Steps to reproduce the bug

Your environment

  • AltTab version: 6.64.0
  • macOS version: 14.2.1
@SamadiPour SamadiPour added the bug Something isn't working label Jan 19, 2024
@warrenseine
Copy link

I experience the same issue with the same environment. I reverted to 6.63.0 and the weird behavior is gone.

I suspect this is related to this commit.

@lwouis
Copy link
Owner

lwouis commented Jan 19, 2024

Thank you @warrenseine for sharing this message.

@SamadiPour does v6.63.0 also fix the issue for you?

I don't see how the issue would be related to the commit though.

@SamadiPour on your video, I see some flickering on the right part of AltTab's window. I'm wondering if you are not suffering from #1840. Could you please show the top menubar of your screen, when the issue happens? If there are 2 AltTab icons, that's the source of the issue right there.

@lwouis lwouis added the unreproducible Need help from the author to reproduce the issue label Jan 19, 2024
@SamadiPour
Copy link
Author

@lwouis Just tried v6.63.0, and it seems like I can't see the issue anymore. I will test more to make sure.

Also, flickering might be because of video compression or the recorder. I didn't see any flicker while using it. I also checked the processes and top menubar, and there was only one instance running.

@SamadiPour
Copy link
Author

Update: I have not experienced the issue since downgrading to v6.63.0.

@ankushagarwal
Copy link

I can confirm that this happens to me as well. I am on the app version 6.64.0. I am on the latest macOS Sonoma version 14.2.1

https://www.loom.com/share/76a2006f084b4b52880ec7a25879958e

@ythosa
Copy link

ythosa commented Jan 26, 2024

the same problem

@esserrge
Copy link

esserrge commented Jan 26, 2024

I had this problem on Sonoma 14.2, it does not seem to happen after upgrade to 14.3. Running alttab 6.64.0 on both versions.

@agmitron
Copy link

The same here

@Warkanlock
Copy link

Warkanlock commented Jan 30, 2024

Same here; it's getting annoying, but I don't want to just throw the issue to maintainers. I'll be happy to contribute if any core maintainer could give me the issue!

@lwouis
Copy link
Owner

lwouis commented Feb 1, 2024

@ankushagarwal from your video, I wonder if this issue is related in any way to the mouse. Can you reproduce the issue without moving the mouse at all, with the mouse outside the AltTab UI?

Same question for @SamadiPour: can you reproduce the issue without having the mouse hover AltTab?

It looks to me like it could be about key repeats, and maybe external keyboards or software keyboard remappers.

@warrenseine
Copy link

warrenseine commented Feb 1, 2024

I do use BetterTouchTool, but only to bind shortcuts.

I use the trackpad and generally don't touch it while alt-tabbing. But it's possible that the cursor is on top of one of the window tile when I alt-tab. I'll monitor.

Also, I'd like to re-iterate that it's very much likely a regression in 6.64. I reverted to 6.63 and didn't have the issue for a week, then I accidently auto-updated back to 0.64 and the bug started again. I re-installed 6.63 once more.

@lwouis
Copy link
Owner

lwouis commented Feb 1, 2024

I'm suspecting that it is not a regression introduced in v6.64. I suspect it because the only code change that could potentially impact is 3b0194d, and I can't imagine how it would interact with the use-case here. I may be missing it, but I could also be guessing right, in which case the issue is not about AltTab, but about something with your environments.

Many people have thought AltTab was bugged, and later realized that the root cause was their external keyboard, software remapper, rare keyboard layout, key repeat settings, etc.

In the case that the issue would be a regression from AltTab, it would be important to establish if indeed the mouse position or movement is involved, or if it's purely a keyboard event issue. The code change only deals with keyboard events, which is why I'm suspecting that the mouse may not have anything to do with the behaviors we see on the various videos.

@np25071984
Copy link

I experience the same.

Noticed strange thing about the app switcher window - when there are two apps (Slack and Mictosoft Teams in my case) and the mouse cursor is somewhere around the switcher area, after I pressed app switch combination the switcher window remains on the screen. Having hard time reproducing it yet but it is definitely the thing. Have caught it many times so far. I believe it is relevant to the topic.

@micpiatek
Copy link

micpiatek commented Feb 13, 2024

Can confirm that I was experiencing the same issue on 6.65.0 and reverting back to 6.63.0 fixed it. Whenever I would move my mouse when using AltTab, the selection window would spaz out and be completely unusable until after restarting the app.

Similar issue that was closed here #3168

@harshmandan
Copy link

harshmandan commented Feb 15, 2024

Same problem here.

I couldn't switch windows using alt+tab whenever the mouse was over the switcher UI, even if I did not move the pointer, the switching would glitch out and wouldn't work.

To make it work I have to move the cursor away from the center (to be specific, outside the switcher overlay) and then alt-tab would work fine.

Reverted to v6.63.0, it's working fine now.

@RecuencoJones
Copy link

I've been trying 6.63.0 for a couple days and thought it was fixed but apparently it technically isn't, I still get the option drifting but way less often than with latest version.

@warrenseine
Copy link

Yes, same here. I've reported that it was ok in 6.63.0, but after a few days / weeks, I've noticed the behaviour too.

@lwouis
Copy link
Owner

lwouis commented Feb 15, 2024

It looks like my hypothesis was right then.

The issue is either with some external factor like third-party hardware or software, or it's an AltTab issue with has been here for a while, before v6.63.0.

@harshmandan
Copy link

harshmandan commented Feb 16, 2024

I degraded to 6.63.0 after running into this problem and I posted about it here.

I also wanted to share the video of what I was seeing. So I recorded my screen with the degraded version 6.63.0 working normally, then I installed 6.65.0 but I could not reproduce the behavior I was facing before. It's super weird. It has been only a day and If it returns I'll record and add a video here.

Regarding external factors, I use BetterTouchTool (to map gesture on trackpad to open a link in a new tab) and I do use an external bluetooth keyboard.

So maybe it could be related to something external, 🤷‍♂️.

This was referenced Feb 16, 2024
@lwouis
Copy link
Owner

lwouis commented Feb 16, 2024

Can anyone reproduce the issue without having the mouse hover the UI? I would like to understand if the issue is related to the mouse hovering the UI, or not.

@broegaard
Copy link

I have also experienced something similar to this problem randomly through months (maybe years), but not with 6.65.0.

I have a gut feeling that it might have something to do with cpu load, but I cannot reproduce it.

@evanhammer
Copy link

I was seeing this issue but upgrading to 6.72.0 (from 6.70.0) fixed it for me.

@slkmikhail
Copy link

slkmikhail commented Aug 1, 2024

I'm seeing this issue even I upgraded to 6.72.0 and disable all checkboxes in that place #3466 (comment).
Only this build #3117 (comment) solves the problem even some checkboxes enabled here #3466 (comment).

@sergeevii123
Copy link

Still seeing this issue in 6.72.0. It happens rarely but still does

@evanhammer
Copy link

evanhammer commented Aug 12, 2024 via email

@shalgi
Copy link

shalgi commented Aug 13, 2024

I'm having the same problem

@matis-dk
Copy link

matis-dk commented Aug 14, 2024

Definitely seems like one of the latest release reintroduced this issue. 6.72.0 is bugging out if the cursor is overlaying the window tiles when alt-tabbing.

Downgrading to 6.70.1 seems to fix the issue in my end.

@unodgs
Copy link

unodgs commented Aug 21, 2024

It happens to me all the time, this custom build from this thread solves the problem for me

@thestarsarehigh
Copy link

Experiencing this issue. If I figure out how to reproduce it I will update. No external input devices connected, M1 MacBook Air. Am running Raycast for Cmd+Space Spotlight search replacement as well as Cmd+[L/R] Arrow window management but nothing else.

@xdanik
Copy link

xdanik commented Sep 9, 2024

I am also experiencing this issue. Version 6.72.0. Downgrading to 6.70.1 resolved the issue for me.

@nyanpasu64
Copy link

nyanpasu64 commented Sep 10, 2024

I managed to fix the CopyPNGFile error. checking the XCode log via https://stackoverflow.com/questions/30060898/xcode-how-to-see-build-command-and-log revealed that /Applications/Xcode.app/Contents/Developer/usr/bin/copypng was unable to see dirname/cp, and launchctl getenv PATH revealed that launchd had a PATH only including MacPorts because I had attempted to alter PATH in ~/Library/LaunchAgents/environment.plist (launchd's PATH should start empty).

Every time you run an AltTab with a different signing key, you need to remove the old version from the accessibility and screen recording lists (using the - button at the bottom), then restart the program and grant the new version permissions. This is somewhat fiddly, you have both the permission denied popups and the AltTab button to open System Settings.

Oddly I have not been able to reproduce this bug using either the official build or my local build after installing a local build with new permissions. Maybe it was because of a custom build without .png files, maybe because permissions were granted incorrectly (upon app/OS update?). I will debug further if the bug reappears.

  • I wonder if the bug is caused by incorrect accessibility permission settings causing the app to receive held/repeated key/mouse inputs?
  • Does "Reset preferences and restart..." fix the problem for others? Ideally you should back up preferences first (~/Library/Preferences/com.lwouis.alt-tab-macos.plist) so you can compare to find what changed...

@nimec01
Copy link

nimec01 commented Sep 11, 2024

  • Does "Reset preferences and restart..." fix the problem for others? Ideally you should back up preferences first (~/Library/Preferences/com.lwouis.alt-tab-macos.plist) so you can compare to find what changed...

I just tested it and it (currently) works for me. Comparing the old and new .plist file reveals that:

  • MSAppCenterInstallId has changed
  • MSAppCenterPastDevices has changed
  • MSAppCenterSessionIdHistory has changed
  • MSAppCenterUserIdHistory has changed
  • NSWindow Frame NSNavPanelAutosaveName has changed
  • NSWindow Frame NSFontPane got removed
  • NSWindow Frame SUUpdateAlert got removed

Hope this helps.

@lwouis lwouis changed the title After opening AltTab, it seems like the Next Window shortcut is pressed a few times without the user doing anything After opening AltTab, it seems like the Next Window shortcut is held or pressed a few times without the user doing anything Sep 12, 2024
This was referenced Sep 12, 2024
@dottedmag
Copy link

I have found a way to make this bug go away, and it probably explains why "trying $random version" also helps a lot of people — changing versions should always fix it:

going to System Settings -> Privacy & Accessibility, removing AltTab, and then re-adding it back fixes the skipping for me.

@nyanpasu64
Copy link

I just tested it and it (currently) works for me. Comparing the old and new .plist file reveals that:

* `MSAppCenterInstallId` has changed

* `MSAppCenterPastDevices` has changed

* `MSAppCenterSessionIdHistory` has changed

* `MSAppCenterUserIdHistory` has changed

* `NSWindow Frame NSNavPanelAutosaveName` has changed

* `NSWindow Frame NSFontPane` got removed

* `NSWindow Frame SUUpdateAlert` got removed

Hope this helps.

I'd suggest you quit AltTab, delete the new .plist and copy the backup to the original name, then observe what happens. But somehow when I do it on my computer, AltTab throws away the changes I made to the file (eg. binding to Cmd instead of Option/Alt). I don't currently plan to look into why (whether it's caused by the app, the plist library, or macOS opening the file even when AltTab is closed).

@nimec01
Copy link

nimec01 commented Sep 13, 2024

I'd suggest you quit AltTab, delete the new .plist and copy the backup to the original name, then observe what happens. But somehow when I do it on my computer, AltTab throws away the changes I made to the file (eg. binding to Cmd instead of Option/Alt). I don't currently plan to look into why (whether it's caused by the app, the plist library, or macOS opening the file even when AltTab is closed).

This changed nothing for me. The bug is still gone. It also did not revert my binding.

MSAppCenterPastDevices, MSAppCenterSessionIdHistory and MSAppCenterUserIdHistory were changed again. But I guess this is not related with the bug.

@jordantrizz
Copy link

Anyone here reproducing the issue on the internal macbook keyboard, with the alt+tab shortcut, and no BTT/Karabineer/remaper turned on?

I have Logi Options+, but removing it doesn't seem to have fixed the issue. Would it be possible to log whats occurring during this event to see if it's key repeating?

@nyanpasu64
Copy link

It's possible to make a logging build, but unless the original author signs the program, you'll have to delete and re-add the program to the macOS security permissions, which seems to make the bug disappear (I don't know what causes it to recur, and haven't seen it happen yet). So I have not tried creating one so far (I'm not the original author), and don't know how to.

@jordantrizz
Copy link

jordantrizz commented Sep 14, 2024

Under "System Settings->Keyboard" moving "Delay until repeat" all the way to the right effectively the highest setting 6/6 "Short" the issue appears. However at 5/6, the issue goes away.

@lwouis I think this is why you can't recreate the issue, and why only a small portion of people are facing the issue.

I could be totally wrong here.

Occurs:
image

Doesn't Occur:
image

@markkkkas
Copy link

Under "System Settings->Keyboard" moving "Delay until repeat" all the way to the right effectively the highest setting 6/6 "Short" the issue appears. However at 5/6, the issue goes away.

@lwouis I think this is why you can't recreate the issue, and why only a small portion of people are facing the issue.

I could be totally wrong here.

Occurs: image

Doesn't Occur: image

I can still reproduce it even with 5/6 or 0/6

@xavierchen0
Copy link

xavierchen0 commented Sep 18, 2024

I am still facing the same issue, and I believe it comes down to the mouse cursor being on the Alt-Tab ui. I am able to reproduce the bug and I will include the screen recordings and karabiner's eventviewer keypresses for the recording when the mouse cursor is on the alt-tab ui.

Environment:
macOS Sonoma Version 14.6.1
Alt-Tab Version 6.70.1

Recording with mouse cursor on alt-tab ui

mouse_on_alttab_ui.mov

Karabiner's eventviewer: You can see that after command tab is pressed, a left/right arrow key is immediately pressed even though I did not press them, and only press command + tab
[
{
"type": "down",
"name": {"key_code":"t"},
"usagePage": "7 (0x0007)",
"usage": "23 (0x0017)",
"misc": ""
},
{
"type": "up",
"name": {"key_code":"t"},
"usagePage": "7 (0x0007)",
"usage": "23 (0x0017)",
"misc": ""
},
{
"type": "down",
"name": {"key_code":"t"},
"usagePage": "7 (0x0007)",
"usage": "23 (0x0017)",
"misc": ""
},
{
"type": "up",
"name": {"key_code":"t"},
"usagePage": "7 (0x0007)",
"usage": "23 (0x0017)",
"misc": ""
},
{
"type": "down",
"name": {"key_code":"a"},
"usagePage": "7 (0x0007)",
"usage": "4 (0x0004)",
"misc": ""
},
{
"type": "up",
"name": {"key_code":"a"},
"usagePage": "7 (0x0007)",
"usage": "4 (0x0004)",
"misc": ""
},
{
"type": "down",
"name": {"key_code":"b"},
"usagePage": "7 (0x0007)",
"usage": "5 (0x0005)",
"misc": ""
},
{
"type": "up",
"name": {"key_code":"b"},
"usagePage": "7 (0x0007)",
"usage": "5 (0x0005)",
"misc": ""
},
{
"type": "down",
"name": {"key_code":"left_shift"},
"usagePage": "7 (0x0007)",
"usage": "225 (0x00e1)",
"misc": "flags left_shift"
},
{
"type": "down",
"name": {"key_code":"hyphen"},
"usagePage": "7 (0x0007)",
"usage": "45 (0x002d)",
"misc": "flags left_shift"
},
{
"type": "up",
"name": {"key_code":"hyphen"},
"usagePage": "7 (0x0007)",
"usage": "45 (0x002d)",
"misc": "flags left_shift"
},
{
"type": "up",
"name": {"key_code":"left_shift"},
"usagePage": "7 (0x0007)",
"usage": "225 (0x00e1)",
"misc": ""
},
{
"type": "down",
"name": {"key_code":"u"},
"usagePage": "7 (0x0007)",
"usage": "24 (0x0018)",
"misc": ""
},
{
"type": "up",
"name": {"key_code":"u"},
"usagePage": "7 (0x0007)",
"usage": "24 (0x0018)",
"misc": ""
},
{
"type": "down",
"name": {"key_code":"i"},
"usagePage": "7 (0x0007)",
"usage": "12 (0x000c)",
"misc": ""
},
{
"type": "up",
"name": {"key_code":"i"},
"usagePage": "7 (0x0007)",
"usage": "12 (0x000c)",
"misc": ""
},
{
"type": "down",
"name": {"key_code":"left_command"},
"usagePage": "7 (0x0007)",
"usage": "227 (0x00e3)",
"misc": "flags left_command"
},
{
"type": "down",
"name": {"key_code":"tab"},
"usagePage": "7 (0x0007)",
"usage": "43 (0x002b)",
"misc": "flags left_command"
},
{
"type": "up",
"name": {"key_code":"tab"},
"usagePage": "7 (0x0007)",
"usage": "43 (0x002b)",
"misc": "flags left_command"
},
{
"type": "down",
"name": {"key_code":"left_arrow"},
"usagePage": "7 (0x0007)",
"usage": "80 (0x0050)",
"misc": "flags left_command"
},
{
"type": "up",
"name": {"key_code":"left_arrow"},
"usagePage": "7 (0x0007)",
"usage": "80 (0x0050)",
"misc": "flags left_command"
},
{
"type": "down",
"name": {"key_code":"up_arrow"},
"usagePage": "7 (0x0007)",
"usage": "82 (0x0052)",
"misc": "flags left_command"
},
{
"type": "up",
"name": {"key_code":"up_arrow"},
"usagePage": "7 (0x0007)",
"usage": "82 (0x0052)",
"misc": "flags left_command"
},
{
"type": "down",
"name": {"key_code":"right_arrow"},
"usagePage": "7 (0x0007)",
"usage": "79 (0x004f)",
"misc": "flags left_command"
},
{
"type": "up",
"name": {"key_code":"right_arrow"},
"usagePage": "7 (0x0007)",
"usage": "79 (0x004f)",
"misc": "flags left_command"
},
{
"type": "down",
"name": {"key_code":"right_arrow"},
"usagePage": "7 (0x0007)",
"usage": "79 (0x004f)",
"misc": "flags left_command"
},
{
"type": "up",
"name": {"key_code":"right_arrow"},
"usagePage": "7 (0x0007)",
"usage": "79 (0x004f)",
"misc": "flags left_command"
},
{
"type": "down",
"name": {"key_code":"right_arrow"},
"usagePage": "7 (0x0007)",
"usage": "79 (0x004f)",
"misc": "flags left_command"
},
{
"type": "up",
"name": {"key_code":"right_arrow"},
"usagePage": "7 (0x0007)",
"usage": "79 (0x004f)",
"misc": "flags left_command"
},
{
"type": "down",
"name": {"key_code":"right_arrow"},
"usagePage": "7 (0x0007)",
"usage": "79 (0x004f)",
"misc": "flags left_command"
},
{
"type": "up",
"name": {"key_code":"right_arrow"},
"usagePage": "7 (0x0007)",
"usage": "79 (0x004f)",
"misc": "flags left_command"
},
{
"type": "up",
"name": {"key_code":"left_command"},
"usagePage": "7 (0x0007)",
"usage": "227 (0x00e3)",
"misc": ""
}
]

I changed my keyboard settings to one of the solutions about reducing the "delay until repeat". However, what I found was that this only delays the jumping of windows. If you were to select your windows fast enough, i think it will seem like the bug is not occuring.
image

@warrenseine
Copy link

I understand this is suboptimal, but the easiest option at this point is to add a configuration option to disable the code related to key repetition, as @lwouis did in this comment. It solved the issue for everyone who tried the build.

@nyanpasu64
Copy link

My working theory is that on some installations, when the mouse lies over where the ui appears, the tab key release isn't properly delivered to the widget due to focusing the wrong widget, the alt tab interface appearing after the tab key is released, or the event not being delivered to the widget. I'd have to log the events received by the app's keystroke handling code to know what's going on.

@markkkkas
Copy link

I understand this is suboptimal, but the easiest option at this point is to add a configuration option to disable the code related to key repetition, as @lwouis did in this comment. It solved the issue for everyone who tried the build.

The only problem with this build is that you can’t skip to the first window if you’re already on the last one.

@svintit
Copy link

svintit commented Sep 18, 2024

I had this same issue, restarted alttab and now it works as expected, weird..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unreproducible Need help from the author to reproduce the issue
Projects
None yet
Development

No branches or pull requests