Closed
Bug 612252
Opened 14 years ago
Closed 12 years ago
"clear console" needs a keyboard shortcut in a bad way
Categories
(DevTools :: Console, defect, P2)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 24
People
(Reporter: dietrich, Unassigned)
References
Details
(Keywords: dev-doc-needed, uiwanted, Whiteboard: [fixed by bug 879799][strings] [console-1] [good first bug][mentor=msucan][lang=js])
Attachments
(1 file, 2 obsolete files)
5.89 KB,
patch
|
Details | Diff | Splinter Review |
using the context menu item requires mouse usage, typing "clear()" is undiscoverable (and too many keystrokes).
it would reduce developer frustration (in my case anyway) if there was a keyboard shortcut to clear the console. that way when you're doing reload-log cycles ad-infinitum you don't have to worry about cursor position or the mouse at all.
Updated•14 years ago
|
Status: NEW → ASSIGNED
Comment 1•14 years ago
|
||
What keyboard shortcut should we use here? On the Mac, ⌘K is the shortcut that Terminal.app uses to clear the console, but it's already in use for search in Firefox. ⌘⇧K is in use as well, to close the Web Console.
Comment 2•14 years ago
|
||
that is the question. I suggested, half-jokingly that we use Ctrl/Cmd-Y a la emacs' yank command and possibly put the contents on the clipboard. Ctrl-G (terminal cancel) could work, but it's used for searching. Function keys are kind of off the beaten path...
Comment 3•14 years ago
|
||
Per a discussion with Kevin I'm going to propose ⌘⇧L (for "cLear"?)
Updated•14 years ago
|
Whiteboard: [strings]
Comment 4•14 years ago
|
||
I believe this breaks string freeze, so marking as [strings].
Comment 5•14 years ago
|
||
Proposed patch attached.
Attachment #491621 -
Flags: feedback?(mihai.sucan)
Comment 6•14 years ago
|
||
This patch also contains a fix for bug 612253 (adding a keyboard shortcut to focus the input line).
Comment 7•14 years ago
|
||
One open question is how to make these keyboard shortcuts discoverable...
Comment 8•14 years ago
|
||
Comment on attachment 491621 [details] [diff] [review]
Proposed patch.
Patch looks fine. Comments:
+ case "focusInput":
+ let hudBox = HUDService.hudReferences[hudId].HUDBox;
+ hudBox.querySelector(".jsterm-input-node").focus();
+ break;
Why not do hud.jsterm.inputNode.focus() ? Like you did in the mochitest.
+ jsterm.clearOutput();
+ finishTest();
finishTest() will close the tab with the Web Console. Clearing the output is not really needed.
Control-Shift-I is used by the DOM Inspector extension. I cannot focus the input using the shortcut.
To make the keys discoverable I suggest adding the [Ctrl-Shift-L] and [Ctrl-Shift-I] strings to tooltips for each relevant element: to the input, and to the Clear console menuitem (soon the Clear button). Also, these need to be documented in the wiki page about the Web Console.
Attachment #491621 -
Flags: feedback?(mihai.sucan) → feedback+
Comment 9•14 years ago
|
||
bummer about control-shift-I and DOM Inspector. I don't think we want to compete with that particular extension for the key.
control-shift-M for coMMand line? bleah...
(also, I've cc'ed sheppy and added dev-doc-needed for this so that we make sure the Web Console page is updated...)
Keywords: dev-doc-needed
Comment 10•14 years ago
|
||
cmd/ctrl-shift-I is also used by the (non DOMi) Inspector. DOMi overrides this setting in later versions.
I think when we were hunting for an unused key back then, we realized that all the good keys are taken. Q.v., ctrl-E for Panorama.
Updated•14 years ago
|
Whiteboard: [strings] → [strings] [console-1]
Updated•14 years ago
|
Assignee: pwalton → nobody
Updated•13 years ago
|
Status: ASSIGNED → NEW
Component: Developer Tools → Developer Tools: Console
OS: Linux → All
Hardware: x86 → All
Whiteboard: [strings] [console-1] → [strings] [console-1] [good first bug][mentor=msucan][lang=js]
Updated•13 years ago
|
Status: NEW → ASSIGNED
Component: Developer Tools: Console → Developer Tools
OS: All → Linux
Hardware: All → x86
Updated•13 years ago
|
Status: ASSIGNED → NEW
Component: Developer Tools → Developer Tools: Console
OS: Linux → All
QA Contact: developer.tools → developer.tools.console
Hardware: x86 → All
Updated•13 years ago
|
Assignee: nobody → sonny.piers
Comment 13•13 years ago
|
||
I use the accel+shift+C shortcurt but it's probably already used somewhere, need instruction on this.
Attachment #491621 -
Attachment is obsolete: true
Attachment #608382 -
Flags: review?(paul)
Comment 14•13 years ago
|
||
I forgot to remove a debug line in the test.
Attachment #608382 -
Attachment is obsolete: true
Attachment #608390 -
Flags: review?(paul)
Attachment #608382 -
Flags: review?(paul)
Comment 15•13 years ago
|
||
Accel+shift+C seems to be used by firebug.
Comment 16•13 years ago
|
||
Why don't you keep the <command>?
Comment 17•13 years ago
|
||
IIRC it's because I wanted to use the same code for the keyboard shortcut and for the button.
Comment 18•13 years ago
|
||
Comment on attachment 608390 [details] [diff] [review]
0.1.1
Sorry for the delay :/
Can you move the `const` somewhere else?
(or not use it at all)
Also, do you think we could not build the <key> dynamically and, instead, add it somewhere here: http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser-sets.inc#234
Attachment #608390 -
Flags: review?(paul)
Comment 19•12 years ago
|
||
bump
Comment 20•12 years ago
|
||
What's the status of this? (Just curious, because I ran into this problem again the other day)
Comment 21•12 years ago
|
||
doing a little spelunking, line 472 in webconsole.js:
let clearButton = doc.getElementsByClassName("webconsole-clear-console-button")[0];
clearButton.addEventListener("command", function WCF__onClearButton() {
this.owner._onClearButton();
this.jsterm.clearOutput(true);
}.bind(this));
What I'd like to see is a clear command in webconsole.xul associated with this button. No need to set all this up dynamically.
Comment 22•12 years ago
|
||
Sonny, are you still working on this bug? I'm checking because it's on the list of mentored bugs. Thanks!
Flags: needinfo?(sonny.piers)
Updated•12 years ago
|
Assignee: sonny.piers → nobody
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: needinfo?(sonny.piers)
Resolution: --- → FIXED
Whiteboard: [strings] [console-1] [good first bug][mentor=msucan][lang=js] → [fixed by bug 879799][strings] [console-1] [good first bug][mentor=msucan][lang=js]
Target Milestone: --- → Firefox 24
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•