Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 144943 Add keyboard shortcut to focus the developer console
Starred by 12 users Reported by alexan...@skovik.com, Aug 27, 2012 Back to list
Status: Fixed
Owner: apavlov@chromium.org
Closed: Feb 2014
Components:
OS: Mac
Pri: 2
Type: Feature


Sign in to add a comment
Chrome Version: 21.0.1180.79
OS Version: OS X 10.7.4

What steps will reproduce the problem?
1. Open devtools, either right click - Inspect Element or Ctrl + Shift + I (attached to the window)
2. Focus on something in the website your browsing, e.g. select some text.
3. With focus on the website there is no keyboard shortcut to move focus to the developer console, and hence no keyboard shortcuts for the developer console works (https://developers.google.com/chrome-developer-tools/docs/shortcuts?hl=sv)

What is the expected result?
A keyboard shortcut should exist that focus the developer console.

What happens instead?
Nothing. No way of focusing the developer console.

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1


 
Comment 1 by meh...@chromium.org, Aug 27, 2012
Labels: -Area-Undefined Area-UI Feature-DevTools
Comment 2 by pfeldman@chromium.org, Oct 12, 2012
Owner: apavlov@chromium.org
Status: Assigned
Comment 3 by apavlov@chromium.org, Oct 18, 2012
Labels: -Type-Bug Type-Feature
I should add that it's focus for the console input filed that I'm referring to. The OS itself has shortcuts for cycling through application windows (although a shortcut to focus on the Developer Tools window for the currently active webpage would be useful too [when there are many windows cycling through each one is cumbersome]).
*input field
Comment 6 by apavlov@chromium.org, Jan 11, 2013
Re comment #4: the Ctrl+Shift+I (or Cmd+Alt+I on Mac) shortcut will focus the corresponding DevTools window if one has been opened for the current tab, so there's no problem for the detached DevTools window case.
Comment 7 by alexan...@skovik.com, Jan 11, 2013
Yes, that is true (though pressing it if the window already has focus, or pressing twice by accident) will open another window, but you are definitely right, that is possible.

What I'm requesting is a way to focus the command prompt, e.g. focus on the input field where one types commands. Such an addition would make keyboard navigation much easier!
Project Member Comment 8 by bugdroid1@chromium.org, Mar 10, 2013
Labels: -Area-UI -Feature-DevTools Cr-Platform-DevTools Cr-UI
Comment 9 by apavlov@chromium.org, Feb 21, 2014
Status: Fixed
Ctrl+` should bring up the console or focus it if one is visible.

Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167592
Project Member Comment 10 by bugdroid1@chromium.org, Feb 21, 2014
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=167592

------------------------------------------------------------------------
r167592 | apavlov@chromium.org | 2014-02-21T12:27:46.425282Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/ConsoleView.js?r1=167592&r2=167591&pathrev=167592
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/inspector.js?r1=167592&r2=167591&pathrev=167592

DevTools: Focus visible console on Ctrl+`

Currently, the hidden console is shown on Ctrl+`, but it is not focused if it is visible. This patch handles the focusing part.

R=eustas@chromium.org, eustas, vsevik
BUG= 144943 

Review URL: https://codereview.chromium.org/162553005
------------------------------------------------------------------------
Comment 11 by oliverj...@gmail.com, Jun 30, 2014
It would be nice if this shortcut also returned focus to the rest of the DevTools when the console is focused, aka toggling focus between the two areas. If you're on the console pane there's no way to use the Command/Ctrl-[1-8] keyboard shortcuts to access each of the panes.
Much appreciated!
Comment 13 by Deleted ...@, Sep 30, 2014
this one is nice
Comment 14 by Deleted ...@, Feb 13, 2015
Nothing mentioned here satisfies the OP's requirement.

If the debugger is open, specifically the console and it does not have focus, there is no keyboard shortcut to return focus to the debugger.

The closest thing to it, which wasn't even mentioned here, is to toggle the element inspector twice in succession (ctrl + shift + c). And this only works intermittently. On multiple occasions for me it has failed to work. Enough that the net utility is negative.

This feature is sorely needed.
Comment 15 by Deleted ...@, Oct 11, 2015
This feature would definitely be nice. There is also no way to focus from the console to the webpage if you're using the keyboard to navigate Chrome (with an extension such as Vimium). As the previous comment mentions, hitting ctrl + shift + c (or cmd + shift + c on Mac) twice will focus from the webpage into an already open dev tools console. I haven't tested it enough to know if it always works or intermittently fails as is mentioned above. 

For focusing from dev tools console to a web page, the only solution I found was from a stack overflow post (http://stackoverflow.com/questions/12823333/keyboard-shortcut-to-switch-focus-from-web-developer-tools-to-page-in-chrome-on/30567119#30567119). First, you can hit cmd + L to move focus to Chrome's omnibox. Then, typing in javascript: and hitting enter will move focus to the web page and allow for keyboard navigation via Vimium. The javascript: command can be shortened to j by setting a search engine shortcut in Chrome preferences (see stack overflow post for more information). 
Sign in to add a comment