Open will-ca opened 5 years ago
Thanks for the detailed feedback! I agree the current control set up isn't ideal, but I'm reasonably confident that it's the best that can be achieved given the limitations of the Chrome platform.
I think an ideal solution for the second issue of arbitrariness would be to extend the behaviour of the cooldown to the entire duration that the Alt key stays pressed down.
Absolutely, but there's no way of tracking the state of the alt
key when responding to a Chrome extension shortcut, unfortunately. The browser just tells you a command was triggered, and that's it. The only reason holding alt
works when pressing alt-Q
is that that command triggers a popup, and that page can then listen for the keyup
event from alt
. And you have to use alt-W
to navigate the list in the popup because pressing alt-Q
again would close it, which the extension has no control over.
I often find that I'm still scanning a page to see if it's the one I want when the cooldown expires, meaning that I just go back to the page I started on when I press it again, give up, and just use Alt+Q instead.
I do as well. The timeout was a balance between making it long enough that you could get a sense of the page before pressing it again to navigate further back in the list vs. it being annoyingly long when trying to just toggle between the two most recent tabs.
I'm actually about to release a version that adds another shortcut that can toggle between the two most recent tabs with no delay, which other users have requested. If that's available, then having a longer timeout on the "switch to previous tab" wouldn't be as annoying. Or having the timeout be configurable.
This behaviour is non-obvious and not clearly documented.
It's actually documented both in the webstore description and the extension's homepage. But I agree there's a lot of info there. I'm open to suggestions on how to make it more obvious. I should maybe move the MRU navigation description above the text on searching for tabs, since the former seems to be used more (even though QuicKey started out with just the search functionality).
I just released QuicKey v1.2.0, which adds an alt-Z
shortcut for instantly toggling between the two most recent tabs, without having to wait for any cooldown. Obviously, that's another shortcut to remember, but it could enable having a longer cooldown, since you'd still be able to toggle quickly back and forth without waiting the whole time.
It also may be possible to keep the navigation state active as long as alt
is pressed, but it would require injecting a script on every page to listen for the keyup
event. That requires the "access every site" permission, which I wouldn't want to require just for someone to use the extension. I think it's possible to request the permission on demand, so maybe that's something to explore. Or it could be a totally separate extension.
There's the other limitation that you can't inject scripts into certain pages, such as any that starts with the chrome://
protocol. So you wouldn't be able to hear the keyup
on those pages. There'd probably still need to be a cooldown to handle that case.
@will-ca , after you commented on #15, I realized you'd opened this issue awhile ago. Turns out, I don't think I was right about this part of my response:
I'm reasonably confident that it's the best that can be achieved given the limitations of the Chrome platform.
I now think the popup window branch I mentioned will provide a better experience for a lot of users, with only small tradeoffs. You can use the same shortcut to open the window and navigate the list of tabs, and then release the modifier to switch to the selected tab. That way, you don't have to switch between alt-Q
to open the drop-down and alt-W
to change the selection, and the UI is rendered instantly.
But in this issue you were asking about shortcuts for pushing back through the tab history and activating each tab in turn, while also avoiding the cooldown behavior. Using a popup window may offer a solution to that as well. In the animation below, I'm using alt-Q
to open the popup and then holding alt
while pressing Q
to navigate down the list. With each keypress, the selected tab is brought into view, and then the popup is refocused. At the end, I release alt
and the popup is hidden.
The drawback is that there's some redraw flashing as the selected tab comes into focus, hiding the popup, and then the popup is moved back to the top of the stack. But the advantage is that there's no cooldown required. As long as you keep the modifier down, you're still in navigation mode.
The popup is moved to the top-right of each focused tab, to keep it out of the way of the tab contents, but it could easily be kept in the same place each time, to avoid the jumping around. (The GIF also gets a bit glitchy at the end, where I was switching between the first 3 tabs too quickly for the recording to keep up.)
Anyway, curious to get your thoughts on whether this seems like a useful direction.
Hm. I think this certainly seems potentially pretty useful to me, as well as neat on a technical level. But I suppose the biggest question I'd be concerned about is whether it can be used just as smoothly as the current behaviour, which probably comes down a lot to the redraw flashing, and either keeping the popup in one place or making sure it's easy to follow otherwise.
I'm not a UX designer, and I can't really speak for sure to how useful or disruptive this change would be without having tried it, so I think the most useful thing for me to do here might be based on trying to analyse and share how I interact with this extension, as a user:
I basically never use the ALT
+A
and ALT
+S
shortcuts. I don't really keep a mental history of my recent tabs that's ordered/indexed rigorously enough for me to be able to page through it by an exact number of entries to get back to the tab I want, which means that I have to respond to on-screen feedback when paging through the recently used tabs— either in a dropdown menu, or the active tab. The time that it takes me to parse the current tab, decide whether I've gone too far or need to keep going, and press another keystroke is apparently right around when the cooldown ends though, which means that ALT
+A
/ALT
+S
ends up behaving unpredictably to me. I get confused, and I end up using ALT
+Z
and/or ALT
+Q
to get back to where I was. I suppose showing the dropdown while removing the cooldown would fix this in both ways.
I use ALT
+Z
probably about as much as ALT
+Q
. However, like with ALT
+A
, I think it's maybe a little bit frustrating (as a very minor inconvenience) when the tab it takes me to isn't the one I was thinking of and I have to start over, once I've realized, instead of continuing to page through.
Having to use a separate ALT
+W
key feels pretty natural to me now, but I think I may have found it a little bit harder to get used to than if I could have just kept pressing the ALT
+Q
key.
I think I also regularly reach for the arrow keys or the mouse instead of using ALT
+W
when I'm more unsure where the tab I want is in the list order. I did not know about ALT
+SHIFT
+W
. I think I could get used to holding down SHIFT
fine, but I also think using three keys, including two modifiers, is probably significantly less convenient and accessible than just having another key. If the functionality of ALT
+A
will be folded into pressing Q
again with the modifier held down, then it'd probably be the most useful as long as we can still go forwards with W
like ALT
+S
as well.
I also use the search pretty regularly.
I guess another concern would be when and how consistently the intermediate tab activation actually occurs. Does it happen during search, mouseover, or arrow-key selection as well? Because in those cases, you're probably just trying to choose a specific item in the list, and don't benefit from the intermediate entries being activated. If it only happens when you repeatedly press Q
with the modifier held down, then might it be confusing why some ways of navigating the dropdown result in instant tab switches while others don't?
There are also some potential use cases that I might anticipate being affected by the window switching. If you have two windows open side-by-side to read through them at the same time, for example, with a third window behind them, would paging through tabs raise the background window on top of one of the foreground windows, even if you were only going to another tab in a foreground window? Window draw order is something that the user often explicitly sets, and which is important in a lot of workspaces and workflows. So if it's possible, I think it might be helpful to keep it unchanged except for the current (and final) raised window/tab, if it isn't already.
(That could also apply to keeping the active tab in each window the same if it isn't already, I guess.)
Obviously, when I usually use this extension, it just sort of melts into the overall workflow of my browser UI and I don't pay much attention to it, so I don't know how much of this makes sense or whether it's applicable to other users as well. But hopefully it's helpful.
I appreciate the detailed feedback! Very helpful.
I guess another concern would be when and how consistently the intermediate tab activation actually occurs. Does it happen during search, mouseover, or arrow-key selection as well?
Yeah, in this mode, the selection couldn't track the mouse as it does currently. You also wouldn't be able to search in this mode, since if you released alt
to start typing, the window would close. There would need to be a different shortcut for searching.
If you have two windows open side-by-side to read through them at the same time, for example, with a third window behind them, would paging through tabs raise the background window on top of one of the foreground windows, even if you were only going to another tab in a foreground window?
That's a good point. For instance, if you have windows 1 and 3 next to each other and window 2 behind them, with 1 being the current tab and 2 being the most recent, then navigating from 1 to 3 with this approach would leave 2 on top of 1. In principle it's probably possible to restore the stack order, but it would require focusing each window in order, which would be a lot of window flashing.
I agree with you about the alt-A/S
navigation. I usually remember the last couple tabs, but beyond that it's fuzzy. So I also use alt-Z
a lot, and then either search or navigate through the menu when I'm not sure where the tab I want is.
I did not know about ALT+SHIFT+W.
It's similar to pressing alt-shift-tab
to go back in the window list, or ctrl-shift-tab
to navigate left in the tab order.
I think I could get used to holding down SHIFT fine, but I also think using three keys, including two modifiers, is probably significantly less convenient and accessible than just having another key. If the functionality of ALT+A will be folded into pressing Q again with the modifier held down, then it'd probably be the most useful as long as we can still go forwards with W like ALT+S as well.
It sounds like you're looking for a customizable two-key shortcut for moving back up the list, so you don't have to include shift or reach for the arrow keys. I'm realizing I should just support the switch to previous/next tab shortcuts when the menu is open. When it's not open, they actually switch tabs with each key press. When the menu is open, they just move the selection, and the tab is activated when you release the modifier. Then you'd have easy control over what the shortcuts are.
I'm realizing I should just support the switch to previous/next tab shortcuts when the menu is open. When it's not open, they actually switch tabs with each key press. When the menu is open, they just move the selection, and the tab is activated when you release the modifier. Then you'd have easy control over what the shortcuts are.
Ooh, this does sound like a great way to unify the hotkeys and interface elements. I suppose it'd wrap the functionality of ALT
+W
, ALT
+SHIFT
+W
, ALT
+Z
, and UP
/DOWN
into just three hotkeys that all still behave in ways that make sense in context.
Also, I don't know if this is already planned, but as an aside, I think having the list open, as in demo video, while using the current type of ALT
+A
and ALT
+S
behaviour would go a long way to making the tab history navigation a lot more useful too. Maybe the searchbox could be hidden and the non-selected page titles could be greyed out or something, to make it visually distinct from the ALT
+Q
menu?
Supporting the previous/next tab shortcuts turned out to be more annoying than expected. Handling them while the popup window was open was straightforward, but the same approach didn't work with the drop-down, since it wasn't getting any key up events. Anyway, I finally got it working. There are now 5 shortcuts to move the selection down or up.
You can download an archive of this branch and then unzip it to try it out. Just load an unpacked extension from the src/
directory in the zip to add it to Chrome. No build step is necessary.
@will-ca I've made a bunch of progress on the popup window approach. The popup now appears on the right side of the screen when you're navigating the stack via alt-A
and alt-S
, which feels much less jumpy than aligning it to the top-right corner of the current window. It'll stay open as long as the modifier key is held down, and there's no cool down, so you could use alt-A
to toggle between two tabs, though it's not as instant as the alt-Z
toggle.
I'm planning on adding an option to control whether the popup appears while navigating through the recents, but it's not in there yet. I'll also add an option to specify where the popup appears: on the left, right, centered, etc.
If you want to try it out, you can download the popup-window-ui branch and load it into Chrome.
I personally find the default
Alt
+A
behaviour a just a little bit too difficult to use to be useful. I think what it boils down to is two issues:1) On pressing
Alt
+A
, subsequent presses can have one of two completely opposite behaviours (depending on the750ms
cooldown) that is indicated only by the subtle colour shift in the corner. This behaviour is non-obvious and not clearly documented. I actually didn't realize it was there until I'd read about it in a comment on one of the project's pages, and would probably be quite confused by it if I hadn't come across that.2) The
750ms
cooldown is somewhat arbitrary, does not respond to user input, and does not seem to be configurable. When I do try to use anAlt
+A
shortcut, I often find that I'm still scanning a page to see if it's the one I want when the cooldown expires, meaning that I just go back to the page I started on when I press it again, give up, and just useAlt+Q
instead.I think an ideal solution for the second issue of arbitrariness would be to extend the behaviour of the cooldown to the entire duration that the
Alt
key stays pressed down. This would make sure that the user has a chance to find the page they actually want before they release theAlt
key and reset the tab navigation sequence, and it would be consistent with conventional UI behaviour for operations that require selecting an item from a sequence as well.For the first problem, it could nice too if the navigation sequence could be made more apparent by using
Alt
+A
andAlt
+S
as aliases for pressingAlt
+Q
and then using the cursor keys orW
. This would also unify all of the tab navigation functionality into the same menu feature, as right now there's a lot of different key commands that all do fundamentally the same thing but also all require the user to memorize slightly different rules for each of them (Q, A, S, W, Up, Down
).I also want to just add that on the whole, this add-on is great to use, looks very smooth, runs quickly, and deals with large amounts of information far better than the alternatives that I've tried. So this may seem nit-picky, but it's only because all the basic functions already work great and I'm just legitimately offering my opinion as an user on how the more specific commands could be easier to use in my opinion.