I want to show/hide the bookmark toolbar in Firefox. The only way to do this at the moment is via Alt + V + T + B. Now, that's a lot of buttons to press for something I'd like to do all the time. Is there a way to automate this process by using any sane combination (two buttons)?

  • <ctrl>+<b> doesn't work for you? – DavidPostill Jun 7 '16 at 21:45
  • 7
    @DavidPostill No, I don't want to show/hide the bookmarks sidebar, I want to show/hide the bookmarks toolbar. – Aventinus Jun 8 '16 at 8:41
  • 1
    OK. I've edited the question to make that clear. – DavidPostill Jun 8 '16 at 8:42
  • You could probably use something like AutoHotkey to do what you want. – DavidPostill Jun 8 '16 at 8:43
  • This older post has most upvoted answer that suggested to use "Hide BookmarksBar" extension. – user109256 Jun 8 '16 at 16:53

Update: Fixed in Firefox 84 (https://bugzilla.mozilla.org/show_bug.cgi?id=1328637).

The shortcut should be Shift+<modifier>+B on all three platforms now, where <modifier> is either Control or ⌘, depending on the OS.

Now, you open the "Library" with Shift+<modifier>+O (I like the mnemonic "Organizer"), which changed the long-standing shortcut on some platforms and didn't make everyone happy. I for one am thrilled by the change, because I use all three OSes regularly, and having consistency is helpful.

As you know there is no shortcut for this like you would have in Chrome or Opera, and as of this writing (mid-2019) there are no obvious, straightforward ways of customizing Firefox's keyboard shortcuts anymore without doing something like… coding.

There are, as you might be aware, other options like macOS's Keyboard prefpane, AutoHotkey on Windows, and AutoKey on Linux, but I don't know if writing a script just to click a menu item qualifies as "sane" anymore.

The Hide BookmarksBar extension used to be a pretty okay option, and might still be if you are fine with running one of the ESR releases or (Update: ESR dropped support for "legacy" addons in August 2018) a third-party fork of Firefox that still supports "legacy" extensions.

However, as noted in that other SU post, the "Hide BookmarksBar" extension no longer works in current mainstream versions of Firefox. Given the present limitations of the WebExtension API, it seems unlikely at the moment that the HideBookmarksBar extension could be updated to work again as a WebExtension. This fork of dorando's original keyconfig (which still works with Thunderbird as of this writing) might've also been able to do the job, before mainstream Firefox dropped support for non-WebExtension addons. So, same situation.

For these reasons, I would encourage you to voice your support and/or vote for Firefox bug #1328637 ("Personal toolbar lacks a keyboard shortcut to show/hide the bar") on Mozilla's bug tracker.

  • 2
    Thank you for the suggestion, and you are right. I will do just that. I'm not marking your answer as the correct one however in the unlikely scenario where a proper solution becomes available. – Aventinus Feb 22 '18 at 10:31
  • 2
    Understood, no worries. This is more like a long comment than a real answer anyway. Let's cross our fingers for the shortcut to be implemented in Firefox itself, then we can quit with all these workarounds. :) – TheDudeAbides Mar 1 '18 at 0:26

OSX specific:

  1. go to System Preferences -> Keyboard -> Shortcuts
  2. set an App Shortcut enter image description here
  • 1
    I had tried this and quickly given up on it, because it seemed like it wasn't working half the time. I run an old version of macOS, though, and later versions could've fixed whatever it was? What I did discover in the meantime is that if you click (manually, with the mouse) ViewToolbarsBookmarks Toolbar once, after you initially open Firefox, the hotkey set in the macOS prefpane seems to work for the rest of your browsing session, which is annoying, but not too annoying. It's probably a Firefox bug, because this method usually works reliably for "native" Mac applications. – TheDudeAbides Jun 21 '19 at 20:25
  • Hmm, this interesting. For me, using the Dvorak-Qwerty⌘ keyboard layout, it works a bit weirdly (Firefox ignores the Qwerty⌘ part of that) but sort of works. – Steve Bennett Jul 15 '19 at 2:22
  • For non-english versions of FF: use localized name of menu entry. For example in Russian FF you can find it in path like: ВидПанели инструментовПанель закладок, so you should use Панель закладок in shortcut settings. Btw still the same behaviour in MacOS 10.14.6 + FF 71.0, so use @TheDudeAbides trick to make things work. – Alex Belyaev Dec 20 '19 at 20:57

Using xdotool and wmctrl, under unix:

wmctrl -xa Firefox && xdotool key F2 alt+v t Down KP_Enter

This will toggle the Firefox bookmark toolbar.

Or to force it:

wmctrl -xa Firefox && xdotool key F2 alt+v t b

We can link this command to a keyboard shortcut, or use in scripts.

  • 1
    Thanks! This works for me without the F2. Was that perhaps a copy-and-paste error from xdotool(1)? – cxw Jul 15 '19 at 17:26

As of Firefox release 84.0 you can show/hide the bookmarks toolbar using Ctrl + Shift + B.

Thank you @sagarr for letting me know in the comments (@sagarr did not have enough reputation to answer himself).

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