How do I reassign the keyboard shortcuts for Firefox? I want to use ctrl+right/left to switch tabs. Is there a plugin for this, if Firefox doesn’t natively support this?
8 Answers
Here is what worked for me in March 2016 (Firefox 45):
Install the keyconfig addon from the keyconfig download page and restart.
The addon file is unsigned, so to be able to install it, I first had to enter
about:config
in the address bar and setxpinstall.signatures.required
to false.Go to Addons -> keyconfig -> Preferences.
There are no "Previous Tab" and "Next Tab" entries by default, but you can add them by clicking Add a new key and using the following code snippets (thanks to the author). The "Global" checkbox can be left unchecked.
- Next Tab:
gBrowser.mTabContainer.advanceSelectedTab(1,true);
- Previous Tab:
gBrowser.mTabContainer.advanceSelectedTab(-1,true);
- Next Tab:
Assign whatever keys to the "Next Tab" and "Previous Tab" actions.
(The Customizable Shortcuts addon didn't work for me, as it didn't have entries for Next Tab and Previous Tab.)
-
1
-
1
-
2
-
4@AlekseyF. use this signed drop-in replacement extension from addons.mozilla.org instead. The solution works perfectly with it.– SamveenJul 11, 2016 at 14:08
-
1I wonder if there is any addon like keyconfig that will work for Firefox 57. So far I haven't seen anything than can change shortcuts like Ctrl + Q or Ctrl + Tab– JoschuaOct 15, 2017 at 12:33
AutoHotkey is the answer. I tried those Firefox extensions, but they can't handle all the actions I wanted. AutoHotkey can. Try something like this in a .ahk file:
#IfWinActive ahk_class MozillaWindowClass
{
^Left::Send ^{PgUp}
^Right::Send ^{PgDn}
}
The Keyconfig add-on for Firefox allows you to program most tab-selection keyboard binding.
On OS X, you can switch tabs to the left or right using option+command+left/right. Command+{/} and ctrl+page up/down do the same thing.
I don't know if comparable shortcut keys exist on Windows, though I would guess that ctrl+page up/down work.
Source: http://support.mozilla.com/en-us/kb/keyboard+shortcuts
-
1Thanks, although it would be better if it used ctrl+arrowkeys. Using page up/down to move across the tabbar doesn't feel natural.– John2496Jun 7, 2010 at 16:09
-
Firefox also supports tab switching using CTRL+TAB & CTRL+TAB+SHIFT. Taken from techontour.com/web-browsers/2008/10/04/…– John2496Jun 7, 2010 at 16:14
Keybinder Addon worked best first for me. More easily than the currently most popular answer.
It trivially mapped ctrl-arrowleft
and ctrl-arrowright
to switch between tabs left and right (on linux with firefox 45.01).
It seems good to do any keystroke I want.
I will note that, under gnome-linux, the alt
key is bound to the desktop (for popping up the command dialog). You can work around that by carefully hitting Shift, then Alt; rather than the Alt first.
The Menu Wizard extension worked best for me. Simple and intuitive UI support. You can follow this link for a how to.
Since I had trouble with all the already mentioned plugins I've had to search for another way to do this. I found another Plugin that allows you to customize shortcuts that did worke: The dorando-keyconfig plugin.
- Install it from https://addons.mozilla.org/en-US/firefox/addon/dorando-keyconfig/ and restart Firefox.
- Go into about:addons (or open Addons Settings via the menus) and then into the Dorando Keyconfig Preferences.
For each of the below, press [Add a new key], add the values and check the Global box:
Name: tab_next
Value: gBrowser.mTabContainer.advanceSelectedTab(1,true);Name: tab_prev
Value: gBrowser.mTabContainer.advanceSelectedTab(-1,true);Now you can add a shortcut of your choosing to the keys.
I found those functions in the description of the plugin, which referenced the original Mozilla Forum post which has a link to some Examples.