alt-tab-macos icon indicating copy to clipboard operation
alt-tab-macos copied to clipboard

"Shortcut 2" is reset/unset on every update

Open lasselaakkonen opened this issue 2 years ago • 13 comments

Describe the bug

~On every update of the app, for the last many updates, the "Shortcut 2" has been reset/unset.~

EDIT: Restarting AltTab (which happens when updating AltTab) can in some scenarios reset shortcuts.

~Steps to reproduce the bug~

  1. ~Have some old app version installed~
  2. ~Configure Shortcut 2 to CMD+`~

image

  1. ~Update to latest version (eg 6.50.0)~
  2. ~Shortcut 2 is no longer set to CMD+`~

image

Your environment

  • AltTab version: 6.50.0
  • macOS version: 13.0
  • Other relevant info: Using both US and Finnish keyboard layouts and rebinding of backtick on Finnish layout, this seems to cause weird things to show up in the shortcut box, but the shortcut always works until next app update

EDIT: Steps to reproduce

Using macOS 13.0 (22A380), AltTab 6.54.0.

On US layout there is the key ;, on SU layout the same key is for ö.

Reproducing requires that you restart AltTab when the keyboard layout is different from what it was when setting a shortcut, while using key that is different in both layouts (eg CMD+Space is not reset).

  • Change to US layout
  • Set Shortcut 2 to ; (and CMD always as the modifier for shortcuts here and later on)
  • Restart AltTab
  • Shortcut 2 is still ;
  • Change to SU layout
  • Restart AltTab
  • Shortcut 2 has been reset to nothing
  • Set Shortcut 2 to ö
  • Restart AltTab
  • Shortcut 2 is still ö
  • Change to US layout
  • Restart AltTab
  • Shortcut 2 has been reset to nothing

lasselaakkonen avatar Nov 16 '22 07:11 lasselaakkonen

v6.49.0 introduced a fix for international keyboard (https://github.com/lwouis/alt-tab-macos/issues/1190). It may have impacted you if you had the Finnish layout.

What shortcut did you have set before the updates? Backtick on US-keyboard, or something else? Also, which versions did you update from/to, specifically?

lwouis avatar Nov 16 '22 08:11 lwouis

The shortcut was set to CMD+backtick on US keyboard.

I don't know what version I update from, I'm guessing the previous version, because I have always updated when AltTab has informed of an update. I updated to 6.50.0.

The issue has happened enough in the past updates, that after this latest update I instinctively went to the settings to reconfigure the shortcut. I don't know what was the first update where it happened.

lasselaakkonen avatar Nov 16 '22 19:11 lasselaakkonen

@lasselaakkonen how many times would you say it happened?

lwouis avatar Nov 16 '22 20:11 lwouis

@lwouis really hard to estimate, more than 2x, because I knew to go check the settings after the update, but maybe max 5x.

lasselaakkonen avatar Nov 17 '22 13:11 lasselaakkonen

This happens 2-3 time a week for me. It's hard to say why, I haven't found a concrete action that resets it but it's very annoying and basically makes the shortcut two unusuable.

I'm using the key next to one as shortcut and regularily switches keyboard layout between english and swedish so the character varies between ` and < but before the setting gets reset it works in both layouts. The settings dialog always seems to record it as ` though. Switching layouts is not what's triggering the bug, before it gets reset I can switch back and forward multiple times without issue.

Pajn avatar Jan 24 '23 13:01 Pajn

Unlike for @Pajn, for me the issue has not come up randomly, only in updates in the past.

lasselaakkonen-congrid avatar Jan 24 '23 13:01 lasselaakkonen-congrid

There seemed to be an update available now, so I updated AltTab, but did not run in to the issue this time...

  • I had v6.50 installed
  • I had US layout selected (not sure if this is some part of the puzzle?)
  • Updated to v6.52.1 and restarted the app
  • Shortcut 2 configuration had not gotten reset in the update

lasselaakkonen-congrid avatar Jan 24 '23 13:01 lasselaakkonen-congrid

So, perhaps the keyboard layout thing is somehow involved in this.

Last time I updated from v6.50 to v6.52.1 I had the US keyboard layout enabled and the issue did not arise.

Today:

  • I had v6.52.1 installed

  • I had Finnish keyboard layout (= "SU" layout) selected (seems like this is the key part of the puzzle) image

  • Updated to v6.54.0 and restarted the app

  • Shortcut 2 configuration had been reset image

lasselaakkonen-congrid avatar Feb 21 '23 13:02 lasselaakkonen-congrid

@lasselaakkonen thank you for sharing this new data; it's interesting.

I can't imagine how upgrading would impact this. I suspect that simply quitting and re-opening the app could potentially trigger the same behavior. Could you perhaps try to reproduce the steps but with a simple restart instead of an upgrade?

In your steps, I'm not sure if you were on keyboard layout SU or US when you set the shortcut in AltTab by the way. So the steps would be, I think:

  • Set the shortcut, while having the same keyboard layout as you did in your previous example
  • Then switch to SU layout
  • Then restart AltTab
  • Then check if the shortcut is set ot unset

lwouis avatar Feb 21 '23 17:02 lwouis

As you guessed, it was not dependent on the upgrade, that just happened to be one of the rare times that I restart AltTab.

About the keyboard layouts, on US layout there is the key ;, on SU layout the same key is for ö.

This is how to reproduce:

Using macOS 13.0 (22A380), AltTab 6.54.0.

Reproducing requires that you restart AltTab when the keyboard layout is different from what it was when setting a shortcut, while using key that is different in both layouts (eg CMD+Space is not reset).

  • Change to US layout
  • Set Shortcut 2 to ; (and CMD always as the modifier for shortcuts here and later on)
  • Restart AltTab
  • Shortcut 2 is still ;
  • Change to SU layout
  • Restart AltTab
  • Shortcut 2 has been reset to nothing
  • Set Shortcut 2 to ö
  • Restart AltTab
  • Shortcut 2 is still ö
  • Change to US layout
  • Restart AltTab
  • Shortcut 2 has been reset to nothing

lasselaakkonen avatar Feb 22 '23 07:02 lasselaakkonen

I was able to reproduce the issue with the steps above. Thank you!

lwouis avatar Feb 22 '23 18:02 lwouis

The issue seems to be in the ShortcutRecorder library that we use. the SRShortcut instance fails to instanciate with Shortcut(keyEquivalent: ";"), when the keyboard layout is in Finnish.

lwouis avatar Feb 22 '23 19:02 lwouis

Hi, my problem is setting ⌘ backtick as Shortcut 3 always being reset/unset on every system startup. Seems to be relevant to this issue?

I use Rime as my main input method, and I have indeed another keyboard layout other than US which has a higher priority right after startup.

GJRobert avatar May 19 '23 01:05 GJRobert