Inconsistent keyboard shortcuts for closing Other Tabs
-
I've found that the keyboard type-ahead shortcut for Close Other Tabs sometimes switches from O to C. I've attached two screenshots to show this.
Most of the time if I right click on a tab the first time I hit C it jumps to Close Copy Link and the second time I hit C it jumps to Close Tabs to the Right. The letter O takes me to Close Other Tabs. But once in a while the Close Other Tabs type-ahead shortcut changes from O to C. So I have to hit C a 3rd time to get to Close Tabs to the Right.
The reason this is a problem, besides making it impossible to know whether to hit two or three Cs without looking at the menu, is that I use an Autohotkey script to close tabs to the right, then trigger that script with a button on a Streamdeck device. The script right-clicks on the tab then sends the letter C twice. On those occasions when the type-ahead shortcut for Close Other Tabs has switched from O to C the script ends up closing all tabs.
-
@tomgoodell Check out the help article about renaming menu entries. You can add an anchor (
&
) to command names, which will fix the letter being used to trigger the item. -
Why not simply use the dedicated hotkey instead of faffing around with AHK scripts?
Note: You'll have to set it first.
-
@luetage thanks for your comment. I don't see how to use this on the menu that pops up when I right click on a tab, it appears to just apply to the Vivaldi main menu.
-
@Pathduck Thanks for your suggestion. I could do that, but I have multiple Vivaldi configurations and use them on different computers. When I can accomplish a task with Autohotkey it works universally on all of them, rather than having to tweak every instance. And if for any reason Vivaldi ever gets reset to defaults I don't have to go in and reset all my customizations; the AHK script still works.
I would expect consistency in the menu shortcuts, so I thought perhaps this was a bug. But if there's no other way I will resort to what you suggested.
-
@tomgoodell Click on the menu button under menu customizations. Select βTab,β edit the entries.
-
@tomgoodell said in Inconsistent keyboard shortcuts for closing Other Tabs:
I would expect consistency in the menu shortcuts, so I thought perhaps this was a bug. But if there's no other way I will resort to what you suggested.
The problem is, you can't expect consistency when the menu layout changes - as per your images. The shortcuts are auto-assigned based on the first (capital) letter(s), if it's already taken it moves to the next one.
This is probably handled in Chromium's native code which in turn uses the OS context menu assignment of shortcuts.
The alternative would be Vivaldi hard-coding the shortcuts for every option and every possible combination of options in the menu, which changes depending where the context menu is shown from. And they'd have to do that for every single language supported and every time a new feature is added. Obviously this is not workable.
The only solution is hard-coding the shortcuts like luetage writes by adding a
&
in front of the key.
This will still be no guarantee that your key is #3 or #2 in the options, it only guarantees that the key will be set. -
@luetage Thanks for that clarification! By putting Close Tabs to the Right at the top of the menu it ensures that the first item that uses "c" is that one. It still has the problem I mentioned to @Pathduck that this requires me to customize it for each Vivaldi configuration that I use, and if for some reason Vivaldi gets reset I have to do it all over again, but it does work. I appreciate the help!