Closed
Bug 1162848
Opened 10 years ago
Closed 9 years ago
clear console keyboard shortcut should be something other than Ctrl+L
Categories
(DevTools :: Console, defect)
DevTools
Console
Tracking
(firefox40 affected, firefox44 verified)
VERIFIED
FIXED
Firefox 44
People
(Reporter: heycam, Assigned: bgrins)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, Whiteboard: [polish-backlog][difficulty=easy])
Attachments
(2 files)
While I appreciate the history of Ctrl+L as the terminal clearing shortcut key, I find its use to clear the Web Console a little annoying, as it conflicts with Ctrl+L meaning to focus the location bar. This means that when the web console is not open, Ctrl+L selects the address bar, but when it is open, it clears the console. I don't think we should have shortcut keys that change meaning like this.
I suggest Ctrl+Shift+L instead.
Reporter | ||
Comment 1•10 years ago
|
||
Since Ctrl+L (and not Cmd+L) is what Terminal.app on OS X uses, would it be OK to leave the key as Ctrl+L on OS X but be Ctrl+Shift+L on Windows/Linux?
Flags: needinfo?(dcamp)
Comment 2•10 years ago
|
||
I don't really feel qualified to weigh in on this. I'm going to needinfo? jgriffiths who may also feel unqualified to weigh in, but can consult one of our UX folks if he so desires.
Flags: needinfo?(dcamp) → needinfo?(jgriffiths)
Comment 3•10 years ago
|
||
(In reply to Dave Camp (:dcamp) from comment #2)
> I don't really feel qualified to weigh in on this. I'm going to needinfo?
> jgriffiths who may also feel unqualified to weigh in, but can consult one of
> our UX folks if he so desires.
My comment is from a competitive comparison PoV. Chrome on OS X does what I think might be the right thing:
* Ctrl+L always clears the console
* CMD+L always selects the location bar
On Windows it gets murkier:
* Ctrl+L clears the console, if focused, if not the location bar is selected.
( cmd+l takes you to the lock screen! )
In all cases cmd+shift+l does nothing, so at least it's available.
I think we should mimic chrome on OS X and bind ctrl+shift+l to clear the console on Win/Lin. I'm needinfoing bgrins for his opinion.
Flags: needinfo?(jgriffiths) → needinfo?(bgrinstead)
Assignee | ||
Comment 4•10 years ago
|
||
Coincidentally I just updated https://developer.mozilla.org/en-US/docs/Tools/Keyboard_shortcuts#Web_Console with the ctrl+l shortcut yesterday. ctrl+l is also my go-to shortcut for highlighting the URL bar so overriding that is pretty annoying.
I'm in the camp of staying with ctrl+l on OSX and then switching to something else for Linux / Windows. Ctrl+shift+l seems fine enough to me with the following notes:
* It seems Firebug uses alt+r. Don't know where that came from originally, but it seems there is at least some precedent to use that: https://getfirebug.com/wiki/index.php/Keyboard_and_Mouse_Shortcuts.
* according to http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts#Command_line_shortcuts there isn't a defined shortcut for 'clear screen' in windows terminals.
Flags: needinfo?(bgrinstead)
Comment 5•10 years ago
|
||
(In reply to Cameron McCormack (:heycam) from comment #1)
> Since Ctrl+L (and not Cmd+L) is what Terminal.app on OS X uses, would it be
> OK to leave the key as Ctrl+L on OS X but be Ctrl+Shift+L on Windows/Linux?
Basically - great idea! Thanks Cameron! Let's ship it!
(In reply to Brian Grinstead [:bgrins] from comment #4)
...
> I'm in the camp of staying with ctrl+l on OSX and then switching to
> something else for Linux / Windows. Ctrl+shift+l seems fine enough to me
Agreed.
> with the following notes:
> * It seems Firebug uses alt+r. Don't know where that came from originally,
Maybe we should bind this too? Muscle memory, etc.
Weirdly, chrome seems to bind alt+r to refresh the ui of their toolbox.
Reporter | ||
Comment 6•10 years ago
|
||
(In reply to Jeff Griffiths (:canuckistani) from comment #5)
> > Since Ctrl+L (and not Cmd+L) is what Terminal.app on OS X uses, would it be
> > OK to leave the key as Ctrl+L on OS X but be Ctrl+Shift+L on Windows/Linux?
>
> Basically - great idea! Thanks Cameron! Let's ship it!
Thanks! I thought I was in for a hard time suggesting a UI change. ;)
BTW, is the a menu item or toolbar button somewhere that surfaces this keyboard shortcut? If not, then I wonder if people won't naturally discover it, since it's different from the standard Ctrl+L one.
Assignee | ||
Comment 7•10 years ago
|
||
(In reply to Cameron McCormack (:heycam) from comment #6)
> (In reply to Jeff Griffiths (:canuckistani) from comment #5)
> > > Since Ctrl+L (and not Cmd+L) is what Terminal.app on OS X uses, would it be
> > > OK to leave the key as Ctrl+L on OS X but be Ctrl+Shift+L on Windows/Linux?
> >
> > Basically - great idea! Thanks Cameron! Let's ship it!
>
> Thanks! I thought I was in for a hard time suggesting a UI change. ;)
What do you think about becoming our new devtools UX person? Just throwing it out there...
> BTW, is the a menu item or toolbar button somewhere that surfaces this
> keyboard shortcut? If not, then I wonder if people won't naturally discover
> it, since it's different from the standard Ctrl+L one.
I think the shortcut should also be included in the tooltip for the clear button. We also have Bug 1122699 for surfacing all shortcuts from the toolbox somehow.
Reporter | ||
Comment 8•10 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #7)
> What do you think about becoming our new devtools UX person? Just throwing
> it out there...
UX for me is like art: I can recognise if it's good or not, but don't ask me to paint a masterpiece. ;)
Assignee | ||
Updated•9 years ago
|
Whiteboard: [devedition-polish][difficulty=easy]
Assignee | ||
Updated•9 years ago
|
Whiteboard: [devedition-polish][difficulty=easy] → [polish-backlog][difficulty=easy]
Assignee | ||
Comment 9•9 years ago
|
||
Bug 1162848 - Use a sinlgle synthesizeKeyFromKeyTag helper for mochitest-devtools;r=jryans
Attachment #8676904 -
Flags: review?(jryans)
Assignee | ||
Comment 10•9 years ago
|
||
Bug 1162848 - Make console shortcut ctrl+shift+l on Windows / Linux;r=jryans
Attachment #8676905 -
Flags: review?(jryans)
Assignee | ||
Comment 11•9 years ago
|
||
Had to refactor tests to solve this in a good way, since there was a test directly synthesizing ctrl+l. Pulled in shared-head.js into webconsole so it could use synthesizeKeyFromKeyTag, then went ahead and pulled it into responsivedesign since it had a duplicated synthesizeKeyFromKeyTag function.
Tests pass locally, but here's a try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=71dea8331320
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Attachment #8676904 -
Flags: review?(jryans) → review+
Comment on attachment 8676904 [details]
MozReview Request: Bug 1162848 - Use a single synthesizeKeyFromKeyTag helper for mochitest-devtools;r=jryans
https://reviewboard.mozilla.org/r/22829/#review20355
Nit: sinlgle -> single in commit message
Comment on attachment 8676905 [details]
MozReview Request: Bug 1162848 - Make console 'clear' shortcut ctrl+shift+l on Windows / Linux;r=jryans
https://reviewboard.mozilla.org/r/22831/#review20357
::: devtools/client/webconsole/webconsole.xul:65
(Diff revision 1)
> +#ifdef XP_MACOSX
Is there a reasonable way to do this at runtime, instead of using preprocessing? I'd like to see less preprocessing, not more, in general.
If it's too hard, this is okay for now.
Attachment #8676905 -
Flags: review?(jryans) → review+
Assignee | ||
Comment 14•9 years ago
|
||
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #13)
> Comment on attachment 8676905 [details]
> MozReview Request: Bug 1162848 - Make console shortcut ctrl+shift+l on
> Windows / Linux;r=jryans
>
> https://reviewboard.mozilla.org/r/22831/#review20357
>
> ::: devtools/client/webconsole/webconsole.xul:65
> (Diff revision 1)
> > +#ifdef XP_MACOSX
>
> Is there a reasonable way to do this at runtime, instead of using
> preprocessing? I'd like to see less preprocessing, not more, in general.
>
> If it's too hard, this is okay for now.
I asked around about the approach and it seems like this is the generally accepted way to do it. Here are two other ways I thought of:
1) We could add a single key with both modifiers in xul and then remove the 'shift' one using JS in the case of osx. Makes it a little harder to search the codebase / figure out what is going on, but it does get rid of the preprocessor. It doesn't handle the case if we want to use a totally diff. shortcut in the future (alt+r for instance)
2) We could add two keys in the DOM and have them both be disabled="true" (haven't tested this, but I assume it would work). Then depending on platform un-disable the one. It does change the test a bit since we need to select the non disabled one, but I think this is the better option of the two.
I'm on the fence about if it's worth doing that though, since this is using XUL/<key> goodness anyway, so getting away from the preprocessor might be the least of our worries regarding portability. If this will help with the 'attach a separate devtools frontend to firefox' idea, then I can go ahead and do (2).
Assignee | ||
Comment 15•9 years ago
|
||
Comment on attachment 8676904 [details]
MozReview Request: Bug 1162848 - Use a single synthesizeKeyFromKeyTag helper for mochitest-devtools;r=jryans
Bug 1162848 - Use a single synthesizeKeyFromKeyTag helper for mochitest-devtools;r=jryans
Attachment #8676904 -
Attachment description: MozReview Request: Bug 1162848 - Use a sinlgle synthesizeKeyFromKeyTag helper for mochitest-devtools;r=jryans → MozReview Request: Bug 1162848 - Use a single synthesizeKeyFromKeyTag helper for mochitest-devtools;r=jryans
Assignee | ||
Comment 16•9 years ago
|
||
Comment on attachment 8676905 [details]
MozReview Request: Bug 1162848 - Make console 'clear' shortcut ctrl+shift+l on Windows / Linux;r=jryans
Bug 1162848 - Make console 'clear' shortcut ctrl+shift+l on Windows / Linux;r=jryans
Attachment #8676905 -
Attachment description: MozReview Request: Bug 1162848 - Make console shortcut ctrl+shift+l on Windows / Linux;r=jryans → MozReview Request: Bug 1162848 - Make console 'clear' shortcut ctrl+shift+l on Windows / Linux;r=jryans
Assignee | ||
Comment 17•9 years ago
|
||
Comment on attachment 8676905 [details]
MozReview Request: Bug 1162848 - Make console 'clear' shortcut ctrl+shift+l on Windows / Linux;r=jryans
Please re-review part 2, after making the changes with system.js. New try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=5072c0dd103f
Attachment #8676905 -
Flags: review+ → review?(jryans)
Attachment #8676905 -
Flags: review?(jryans) → review+
Comment on attachment 8676905 [details]
MozReview Request: Bug 1162848 - Make console 'clear' shortcut ctrl+shift+l on Windows / Linux;r=jryans
https://reviewboard.mozilla.org/r/22831/#review20377
Cool, I like it! Thanks for looking into it.
Assignee | ||
Updated•9 years ago
|
Keywords: dev-doc-needed
Comment 19•9 years ago
|
||
Reporter | ||
Comment 20•9 years ago
|
||
Thanks everyone!
Comment 21•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/dd6c3959f1a7
https://hg.mozilla.org/mozilla-central/rev/2b9780ca7aa8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Comment 22•9 years ago
|
||
Keywords: dev-doc-needed → dev-doc-complete
Comment 25•9 years ago
|
||
I have reproduced this bug on Nightly 40.0a1 (2015-05-07) on ubuntu 14.04 LTS, 32 bit!
The bug's fix is now verified on Latest Aurora 44.0a2!
Build ID: 20151110004043
User Agent: Mozilla/5.0 (X11; Linux i686; rv:44.0) Gecko/20100101 Firefox/44.0
[bugday-20151111]
Comment 26•9 years ago
|
||
I have reproduced this bug with Firefox Nightly 40.0a1 (Build ID: 20150507030203) on
windows 8.1 64-bit with the instructions from comment 0 .
Verified as fixed with Firefox Aurora 44.0a2 (Build ID: 20151118004041)
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
As this bug is also verified on Linux (Comment 25),I marking this bug as verified.
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•