Closed Bug 616015 Opened 14 years ago Closed 13 years ago

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

Categories

(Firefox :: Toolbars and Customization, defect)

x86
All
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 4.0b11
Tracking Status
blocking2.0 --- final+

People

(Reporter: jboriss, Assigned: dietrich)

References

Details

(Keywords: late-l10n, user-doc-needed, Whiteboard: [addon bar][strings][softblocker][fx4-fixed-bugday])

Attachments

(1 file, 3 obsolete files)

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
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? :)
Whiteboard: [addon bar] → [addon bar][strings]
PS: Please use the bug markup for strings as it was published in the wednesday meetings.
Ctrl/Cmd+Shift+E (for Extensions)

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

Ctrl/Cmd+Shift+L (for Lots o' add-ons)
Add-on bar not worthy of a shortcut.
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.
Cmd+/ would match Safari's shortcut for showing and hiding the status bar.
(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.
(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.
(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?]
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: dietrich → nobody
re-nominating, per comment #16.
blocking2.0: - → ?
blocking2.0: ? → final+
Whiteboard: [addon bar][strings][softblocker][d?] → [addon bar][strings][softblocker]
Assignee: nobody → dietrich
Attached patch patch, no test (obsolete) — Splinter Review
Attachment #507843 - Flags: feedback?(dao)
Attached patch patch, with test (obsolete) — Splinter Review
Attachment #507843 - Attachment is obsolete: true
Attachment #507849 - Flags: review?(dao)
Attachment #507843 - Flags: feedback?(dao)
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-
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+
Attached patch for check-inSplinter Review
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
thanks, will fix it on check-in.
Whiteboard: [addon bar][strings][softblocker][has patch, needs review dao] → [addon bar][strings][softblocker]
http://hg.mozilla.org/mozilla-central/rev/296a46e08491
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b11
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+/)
Blocks: 629905
Help!

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

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

Aaaah! Thanks!
Y'all are close: The shortcut uses forward slash (/) not backslash (\).
(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?
(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.
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.
> 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.
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)
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.

Attachment

General

Created:
Updated:
Size: