Add a keyboard shortcut to reveal and hide the add-on bar (Accel+/)

VERIFIED FIXED in Firefox 4.0b11

Status

()

Firefox
Toolbars and Customization
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: Boriss, Assigned: dietrich)

Tracking

({late-l10n, user-doc-needed})

Trunk
Firefox 4.0b11
x86
All
late-l10n, user-doc-needed
Points:
---

Firefox Tracking Flags

(blocking2.0 final+)

Details

(Whiteboard: [addon bar][strings][softblocker][fx4-fixed-bugday])

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

7 years ago
For users who heavily rely on add-ons for certain task modes (e.g. web development), a keyboard shortcut would be a useful way to quickly reveal and dismiss the add-on bar. 

The default new keyboard shortcut would be in the same format as other items which are accessed and dismissed, such as the bookmarks sidebar and download history.  Unfortunately, every letter A-Z is currently already being used for a "Ctrl-N" command.  So, I recommend we find a multi-key command that's at least fairly comfortable to type and has a letter associated with the add-on bar.

The following appears not to overlap with existing commands, but please comment if you know otherwise:

Windows:  Ctrl+Shift-B

Mac OSX:  Cmd+Shift+B

Linux:  Ctrl+Shift+B
(In reply to comment #0)
> Windows:  Ctrl+Shift-B

Opens the Library.
Component: Theme → Toolbars
QA Contact: theme → toolbars

Updated

7 years ago
Keywords: late-l10n
keyboard shortcut availability bugs are always loads of fun :p

Just a random idea (which might not be a very good one): what if we mapped accel-a to the add-ons bar, unless a text field had the focus.  There is some precedent for this in that sometimes editors will map accel-b, and that overrides the bookmarks sidebar.  Also, do users really need to copy and paste the entire contents of web pages that often?  They could still access select all from the page's context menu.
I don't think we should ever try to override any of the truly global shortcuts like Cmd-X/C/V/A, especially not have mode-dependent shortcuts.

Is there a way to list all the shortcuts that are defined in Firefox instead of randomly trying them out? :)

Updated

7 years ago
Whiteboard: [addon bar] → [addon bar][strings]

Comment 4

7 years ago
PS: Please use the bug markup for strings as it was published in the wednesday meetings.
(Assignee)

Comment 5

7 years ago
Ctrl/Cmd+Shift+E (for Extensions)

Ctrl/Cmd+Shift+M (for My add-ons)

Ctrl/Cmd+Shift+L (for Lots o' add-ons)

Comment 6

7 years ago
Add-on bar not worthy of a shortcut.

Comment 7

7 years ago
May be Ctrl+Space? Space Bar on the keyboard looks a lot like Addon Bar on the screen, I mean shape and location. Seems to me easy to learn and easy to remember.

Comment 8

7 years ago
Cmd+/ would match Safari's shortcut for showing and hiding the status bar.

Comment 9

7 years ago
(In reply to comment #7)
> May be Ctrl+Space?

That's what was initially used for Tab Candy and was changed due to IME conflict and other reasons. (bug 592183)

(In reply to comment #8)
> Cmd+/ would match Safari's shortcut for showing and hiding the status bar.

Ctrl/Cmd+/ (Accel+/) seems decent enough. If there's a precedent for something similar somewhere, then it sounds as good as any other combination. (assuming no one can dig up a conflict)
(In reply to comment #8)
> Cmd+/ would match Safari's shortcut for showing and hiding the status bar.

This seems like a good shortcut, indeed.
(Assignee)

Comment 11

7 years ago
(In reply to comment #10)
> (In reply to comment #8)
> > Cmd+/ would match Safari's shortcut for showing and hiding the status bar.
> 
> This seems like a good shortcut, indeed.

Doesn't seem to be taken on Linux (Ubuntu).
actually accel-/ has been taken over in bug 483122.

Comment 13

7 years ago
(In reply to comment #12)
> actually accel-/ has been taken over in bug 483122.

Bug 565552 comment #0 says the plan is to get rid of "/" as a shortcut for FAYT. Maybe we can be remove it now and kill two birds with one stone?
Whiteboard: [addon bar][strings] → [addon bar][strings][target-betaN]
Notes from the Grand Retriage: minus and come back around with product drivers
blocking2.0: betaN+ → -
Whiteboard: [addon bar][strings][target-betaN] → [addon bar][strings][target-betaN][d?]

Comment 15

7 years ago
Please make everyone happy and make Key Config a bundled functionality!

P.S. My setting, a localized copy of Safari's: Ctrl+Ç to toggle the status (now "add-on") bar, with:
    var  toolbar = document.getElementById('addon-bar');
    if ( toolbar ) {
    	toolbar.collapsed = !toolbar.collapsed;
    }
We are aware that Ctrl|Cmd-/ won't be optimal for all keyboard layouts (like my Norwegian keyboard), but think the mapping makes sense, and there's also precedent from other browsers.

Re-nominating for softblocker as requested, as one of the central ideas of having the add-on bar was to quickly be able to toggle add-ons visibility on and off.
Keywords: uiwanted
Whiteboard: [addon bar][strings][target-betaN][d?] → [addon bar][strings][softblocker][d?]
(Assignee)

Updated

7 years ago
Assignee: dietrich → nobody
(Assignee)

Comment 17

7 years ago
re-nominating, per comment #16.
blocking2.0: - → ?
blocking2.0: ? → final+
Whiteboard: [addon bar][strings][softblocker][d?] → [addon bar][strings][softblocker]
(Assignee)

Updated

7 years ago
Assignee: nobody → dietrich
(Assignee)

Comment 18

7 years ago
Created attachment 507843 [details] [diff] [review]
patch, no test
Attachment #507843 - Flags: feedback?(dao)
(Assignee)

Comment 19

7 years ago
Created attachment 507849 [details] [diff] [review]
patch, with test
Attachment #507843 - Attachment is obsolete: true
Attachment #507849 - Flags: review?(dao)
Attachment #507843 - Flags: feedback?(dao)
(Assignee)

Updated

7 years ago
Whiteboard: [addon bar][strings][softblocker] → [addon bar][strings][softblocker][has patch, needs review dao]
Comment on attachment 507849 [details] [diff] [review]
patch, with test

Seems like we should expose the keyboard shortcut in the menu where you can toggle toolbars, at least when invoked from the menu bar or Firefox button (as opposed to the toolbar context menu, where I think keyboard shortcuts shouldn't appear).
Attachment #507849 - Flags: review?(dao) → review-
(Assignee)

Comment 21

7 years ago
Created attachment 508429 [details] [diff] [review]
patch, with test, comments addressed
Attachment #507849 - Attachment is obsolete: true
Attachment #508429 - Flags: review?(dao)
Comment on attachment 508429 [details] [diff] [review]
patch, with test, comments addressed

>+      let key = toolbar.getAttribute("key");
>+      if (popup.id != "toolbar-context-menu" && key)
>+        menuItem.setAttribute("key", key);

You can set the attribute unconditionally, it's going to be an empty string if the toolbar doesn't have it:

if (popup.id != "toolbar-context-menu")
  menuItem.setAttribute("key", toolbar.getAttribute("key"));

>+function toggleAddonBar() {
>+  let addonBar = document.getElementById("addon-bar");
>+  setToolbarVisibility(addonBar, !!addonBar.collapsed);

.collapsed is boolean, so !! is a no-op.
Attachment #508429 - Flags: review?(dao) → review+
(Assignee)

Comment 23

7 years ago
Created attachment 508725 [details] [diff] [review]
for check-in

comments fixed
Attachment #508429 - Attachment is obsolete: true
Comment on attachment 508725 [details] [diff] [review]
for check-in

>+      let key = toolbar.getAttribute("key");

this is unused now
(Assignee)

Comment 25

7 years ago
thanks, will fix it on check-in.
Whiteboard: [addon bar][strings][softblocker][has patch, needs review dao] → [addon bar][strings][softblocker]
(Assignee)

Comment 26

7 years ago
http://hg.mozilla.org/mozilla-central/rev/296a46e08491
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED

Updated

7 years ago
Target Milestone: --- → Firefox 4.0b11

Updated

7 years ago
Keywords: user-doc-needed
Summary: Add a keyboard shortcut to reveal and hide the add-on bar → Add a keyboard shortcut to reveal and hide the add-on bar (Accel+/)

Updated

7 years ago
Blocks: 629905

Comment 27

7 years ago
Help!

Forgive my ignorance, but I haven't a clue what key sequence "Accel+\" is or is the sequence something else.

Thanks.

Comment 28

7 years ago
Ctrl plus the \ key on Windows and Linux.
Cmd  plus the \ key on Mac.

Comment 29

7 years ago
(In reply to comment #28)
> Ctrl plus the \ key on Windows and Linux.
> Cmd  plus the \ key on Mac.

Aaaah! Thanks!
(Assignee)

Comment 30

7 years ago
Y'all are close: The shortcut uses forward slash (/) not backslash (\).

Comment 31

7 years ago
(In reply to comment #30)
> Y'all are close: The shortcut uses forward slash (/) not backslash (\).

Oops! Thanks for that correction.

Windows & Linux: Ctrl + /
Mac: Cmd + /

BTW-Am I correct in assuming this works whether the user has the Add-on Bar on to start with or not?
(Assignee)

Comment 32

7 years ago
(In reply to comment #31)
> BTW-Am I correct in assuming this works whether the user has the Add-on Bar on
> to start with or not?

Yep.

Comment 33

7 years ago
Thanks.
Has anyone tried the shortcut with a non-US keyboard?

Ctrl+/ doesn't seem to be working on PT keyboard.
It's not in the nightly builds until tomorrow.

Comment 36

7 years ago
> Y'all are close: The shortcut uses forward slash (/) not backslash (\).
Ugh.

> Has anyone tried the shortcut with a non-US keyboard?
Using my own build on a German keyboard, where "/" is Shift+7:
Ctrl+Shift+7 works fine.
(In reply to comment #36)
> > Has anyone tried the shortcut with a non-US keyboard?
> Using my own build on a German keyboard, where "/" is Shift+7:
> Ctrl+Shift+7 works fine.

Yep, on such keyboard layout, Shift is ignored by key hell (see https://developer.mozilla.org/en/Gecko_Keypress_Event). However, if some keyboard layout's unshifted slash key is used for another shortcut key, e.g., if the key is that unshifted character is '?' and shifted character is '/', and there is a shortcut key for something is Ctrl+Shift+?, you can never use Ctrl+'/' on such keyboard layout. But Accel+Shift+(non-letter) shortcut key is very rare, so, I guess that there is not keyboard layout which has this double booking problem.

Unfortunately, if some keyboard layouts need Option key for inputting '/' on Mac, you cannot use Accel+'/' with such keyboard layout. See bug 306585.
Doesn't work here. / is created with a modifier + i and ctrl+i triggers the bookmark-sidebar.
(Assignee)

Comment 39

7 years ago
Please file followup issues as new bugs, providing information about your platform and locale, and cc me, thanks!
Verified fixed on Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b12pre) Gecko/20110204 Firefox/4.0b12pre
Status: RESOLVED → VERIFIED
Whiteboard: [addon bar][strings][softblocker] → [addon bar][strings][softblocker][fx4-fixed-bugday]
(In reply to comment #34)
> Has anyone tried the shortcut with a non-US keyboard?
> 
> Ctrl+/ doesn't seem to be working on PT keyboard.

It doesn't work on Hebrew keyboards in Linux (see also bug 452393)

Comment 42

7 years ago
Verified fixed on Mozilla/5.0 (Windows NT 6.1; rv:2.2a1pre) Gecko/20110404 Firefox/4.2a1pre
You need to log in before you can comment on or make changes to this bug.