tab-search icon indicating copy to clipboard operation
tab-search copied to clipboard

Add ability to customize extension shortcut key

Open hackel opened this issue 7 years ago • 19 comments

I would like the ability to define a custom shortcut key to activate the extension. Perhaps this is something Firefox needs to implement, the same way that Chrome has a page to manage hotkeys for extensions.

hackel avatar Sep 22 '17 17:09 hackel

I don't think this is possible right now, it doesn't look like Firefox has any support for changing extension hotkeys the same way Chrome does. Is there anything particular about the current hotkey that doesn't work for you?

reblws avatar Sep 26 '17 15:09 reblws

I'd also like this. My preference would be CMD+E to make it consistent with Vivaldi's Quick Commands feature.

blakebutcher avatar Oct 02 '17 04:10 blakebutcher

In terms of why I'd like to change it, I would just like it to be consistent with other editors I use. Also, I just noticed that, at least on GitHub while I have this input focused, ctrl-shift-L inserts the following:


- [ ] 

hackel avatar Oct 25 '17 17:10 hackel

@hackel Okay, that's pretty bad, I'll change it since I don't want the extension to interfere with anyone's workflow.

I originally chose Ctrl+Shift+L because it was closest to Ctrl+Shift+P (the Sublime Text default, currently opens incognito tabs in FF) and the idea was that those three keys would get your hands ready in a typing position.

I'm most likely going to switch the shortcut to Ctrl+E in the next couple of days, unless there are any objections or problems I find with it.

reblws avatar Oct 26 '17 00:10 reblws

I quite like Ctrl+Shift+A which is the Intellij / Jetbrains* equivalent, however it seems that combination either selects all text, or opens Firefox's addons page depending on context.

I also read through the Mozilla's WebExtension docs and it does seem that the only way to customize shortcuts is to include duplicate entries in the manifest and use multiple command listeners - not really an ideal solution.

I'll try out Ctrl +E when the change is made, and if It doesn't work out I'll probably try out patches with other combinations.

ScriptSmith avatar Oct 28 '17 13:10 ScriptSmith

After trying Ctrl+E out, I'm concerned that it's way too close to the destructive commands (Ctrl+W - delete current tab, Ctrl+Q close entire window), the cost of missing the shortcut would be too much -- a tired user might accidentally delete their current browser window or close their current tab when all they wanted to do was navigate out of their current tab. Also current users might be confused about the old shortcut suddenly changing, and I can't think of an elegant way of notifying them about it.

Maybe it wouldn't be so bad to have multiple command listeners the way @ScriptSmith mentioned -- I'd define Ctrl+Shift+L available as the default browser action and Ctrl+E as an alternate keybinding that's left on by default but can be turned off in the settings, at least until Mozilla gets around to implementing custom shortcuts.

Here are the relevant bugzillas to watch out for:

https://bugzilla.mozilla.org/show_bug.cgi?id=1320332 https://bugzilla.mozilla.org/show_bug.cgi?id=1303384

reblws avatar Oct 31 '17 19:10 reblws

Ok after fumbling around with the shortcuts, it looks like browserAction.openPopup doesn't actually work if it's under a command listener, so the multiple shortcut idea is dead. I'll be switching the shortcut to Ctrl+Shift+F in the meantime and add a shortcut hint to search placeholder text.

EDIT: After testing Ctrl+Shift+F I'm finding it very nice compared to Ctrl+E. Ctrl+E is also already a default shortcut for activating the search bar in Chrome. I'd like to bring the extension over to the Chrome store when I feel like it's worthy of the $5 Google Tax, so I think the browser neutral shortcut the good way forward.

Sorry about all the indecision.......

reblws avatar Nov 05 '17 20:11 reblws

Here on macOS the old shortcut "CMD" + "Shift" + "L" worked. The new shortcut "CMD" + "Shift" + "F" switches to fullscreen or window mode.

hiasl360 avatar Nov 06 '17 06:11 hiasl360

In nightly it should be possible to implement this, now that bug 1421811 is fixed. There's even a handy library for it (which at the very least can serve as example code).

thomcc avatar Feb 24 '18 17:02 thomcc

Thanks @thomcc I'm looking into it.

reblws avatar Feb 24 '18 20:02 reblws

So what is the shortcut to trigger Tab Search on macOS? I can't find it anywhere in the settings.

nikitavoloboev avatar Jun 13 '18 13:06 nikitavoloboev

Hey @nikitavoloboev, it's ⌘⇧L but I'm using Karabiner-Elements to remap it for now

cwagner22 avatar Jun 13 '18 13:06 cwagner22

Thanks @cwagner22. I tried ⌘⇧L but realized that I had to have the icon in the toolbar for it to work. Now it works. 🙂

nikitavoloboev avatar Jun 13 '18 13:06 nikitavoloboev

Hi all, sorry I haven't had the time to update the extension with this helpful feature. It'll be in the next update when I get around to it.

reblws avatar Jun 13 '18 14:06 reblws

cmd + shift + L doesn't work for some reason on SoundCloud tabs, I'd be great if it was customizable. FF still doesn't allow to customize shortcuts?

chodorowicz avatar Oct 06 '18 12:10 chodorowicz

@reblws Thanks for this well designed and useful addon!

In OSX there are a bunch of apps that like to hijack cmd + shift + L, and as if that wasn't enough a bunch of websites (eg Slack, Soundcloud) hijack it as well.

I'm commenting to encourage you to release this feature to make it even more useful =)

androidfred avatar Dec 17 '18 03:12 androidfred

Also jumping in to note that it would be extremely helpful to have a customizable shortcut! I should note that a) this is a great extension and b) I am currently using Keyboard Maestro to remap my preferred keyboard shortcut CMD-E to work.

fncll avatar Jan 25 '19 20:01 fncll

Guys, any plans to provide ability to change Ctrl+Shift+F in Firefox to some other shortcut? Unf. Ctrl+Shift+F collides with Google Docs (channging layout of the interface).

HaySayCheese avatar Feb 06 '20 09:02 HaySayCheese

Hi Dima, sorry I'm not actively maintaining this extension at the moment. What you need right now is possible in the latest versions of Firefox (I believe it's in the latest ESR release but I'm not 100% sure). I just haven't added a convenient component to modify it from the regular settings page.

In order to change the shortcut:

Go to Add-ons Manager > Hit the Gear button > Click "Manage Shortcut Extensions"

You should be able to see a list of all the extensions you have installed and their main shortcuts. You can change the default shortcut from there.

Enrico

reblws avatar Feb 13 '20 23:02 reblws