Skip to content

Instantly share code, notes, and snippets.

@fwextensions
Last active May 25, 2019 23:57
Show Gist options
  • Save fwextensions/f2a79df5530354d6ef3058d3671c427a to your computer and use it in GitHub Desktop.
Save fwextensions/f2a79df5530354d6ef3058d3671c427a to your computer and use it in GitHub Desktop.
Why the QuicKey icon inverts when switching between tabs

Thanks for the feedback! Let me explain why the icon changes and then see if you'd still want to disable it.

When the icon is in its normal state, pressing the "previous tab" shortcut (altA, by default) switches to the most recently used tab. As soon as it does so, the icon gets inverted. Pressing altA when the icon is inverted will actually switch to the tab used before the one you just switched to. If you keep pressing it while the icon is inverted, you'll go further back into the stack of tabs. After 750ms, the icon switches back to normal, and pressing altA will again switch to the most recently used tab.

As an example, let's say you open 5 tabs in order, so that tab E is the current one:

A B C D >E<

Pressing altA once will switch back to tab D:

A B C >D< E

Waiting a second and then pressing altA once will switch back to tab E:

A B C D >E<

But now you want to get back to tab B, so you press altA three times while the icon is inverted, which moves you further back in the stack:

A >B< C D E

Now wait a second and press altA again when the icon is normal to switch to E, which was the most recently used tab before you started navigating:

A B C D >E<

So the icon change lets you know what will happen when you press altA, since there are basically two different modes for it, though I get that it may not be obvious what's happening.

I see a few different fixes:

  1. Have an option to not change the icon, but still allow navigating farther back in the stack (so you'd sort of have to guess what will happen).

  2. Make the icon change more subtle, so it wouldn't be distracting if you weren't looking for it.

  3. Have an option to disallow pushing into the stack, so altA would always toggle between the two most recently used tabs no matter how fast you pressed it. (You'd have to use the popup menu to get to older tabs.)

  4. Add another hotkey that would always toggle between the two most recently used tabs, no matter how fast you pressed it. Since there wouldn't be two modes for this key, the icon wouldn't have to change.

I think I'm leaning towards #4, but I'm curious what you think. (If that's not more information than you really wanted. :)

Actually, it just occurred to maybe you're asking about why the icon inverts when you use some other way of switching tabs, like pressing ctrltab repeatedly to move between tabs in order. It's for a related reason: if you keep navigating while the icon is inverted, those intermediate tabs are not counted as "recently used". So if you then wait for the icon to switch back to normal, pressing altA will switch back to where you started, rather than the tab to the left of where you ended up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment