22

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?

1
  • 1
    I thought that this was something built in, but I've just checked and I can't find any options for it all. Is it something they've taken out of 3.6?
    – ChrisF
    May 25, 2010 at 20:39

8 Answers 8

22

Here is what worked for me in March 2016 (Firefox 45):

  1. 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 set xpinstall.signatures.required to false.

  2. Go to Addons -> keyconfig -> Preferences.

  3. 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);
  4. 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.)

6
  • 1
    This still works perfectly in Firefox 9.0.1
    – Alo
    Jan 4, 2012 at 23:07
  • 1
    Lifesaver answer, works fine in Firefox 16.0.2
    – ppp
    Nov 21, 2012 at 2:03
  • 2
    Still works in Firefox 31.0 Aug 20, 2014 at 19:52
  • 4
    @AlekseyF. use this signed drop-in replacement extension from addons.mozilla.org instead. The solution works perfectly with it.
    – Samveen
    Jul 11, 2016 at 14:08
  • 1
    I 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
    – Joschua
    Oct 15, 2017 at 12:33
8

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}
}
3

The Keyconfig add-on for Firefox allows you to program most tab-selection keyboard binding.

2

The SwiftTabs addon even lets you assign single key shortcut for tab switching

1

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

2
  • 1
    Thanks, although it would be better if it used ctrl+arrowkeys. Using page up/down to move across the tabbar doesn't feel natural.
    – John2496
    Jun 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/…
    – John2496
    Jun 7, 2010 at 16:14
1

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.

0

The Menu Wizard extension worked best for me. Simple and intuitive UI support. You can follow this link for a how to.

0

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.

  1. Install it from https://addons.mozilla.org/en-US/firefox/addon/dorando-keyconfig/ and restart Firefox.
  2. Go into about:addons (or open Addons Settings via the menus) and then into the Dorando Keyconfig Preferences.
  3. 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);

  4. 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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.