Keyboard shortcut to switch focus from web developer tools to page in Chrome

前端 未结 12 588
慢半拍i
慢半拍i 2020-12-12 21:50

I use Vimium for Chrome, which allows me to refresh with the r key. When I am using the dev tools I lose focus of the page, and have to click in the page in or

相关标签:
12条回答
  • 2020-12-12 22:11

    Does anyone know of a keyboard shortcut to switch from the dev tools back to the page?

    Tab is the key you're looking for. Use it to focus the page after pressing Esc to open the console.

    0 讨论(0)
  • 2020-12-12 22:12
    • When Chrome DevTools is focused, Shift + F6 will focus on the page content.
    • When Chrome DevTools is open and the page content is focused, F6 will focus on Chrome DevTools.

    Reference: https://support.google.com/chrome/answer/157179

    Google Chrome Feature Shortcuts

    F6 Switch focus forward between the Address bar, Bookmarks bar (if showing), and page content
    Shift + F6 Switch focus backward between the Address bar, Bookmarks bar (if showing), and page content

    0 讨论(0)
  • 2020-12-12 22:13

    I got pretty frustrated with this too, but my problem is a bit different though. I have dev tools detached (in a separate window) and I always need to click to get back to the page.

    I wrote a small applescript that works for me:

    tell application "Google Chrome"
        activate second window -- if I have dev tools open "second window" is the page
        tell second window to tell active tab
            set the URL to "Javascript:window.focus();"
        end tell
    end tell
    

    I have it bound to a shortcut using Spark.

    So whenever I'm in a detached dev tools window, I hit my shortcut and focus is put back to the page and I can use Vimium again.

    0 讨论(0)
  • 2020-12-12 22:20

    My solution is based on Upper answers (for Mac users):

    1. Set drawer to Console
    2. With focus in DevTools, press Esc to open drawer (Console)
    3. Press Tab, to switch focus on page
    4. With focus in page input, press Shift + Tab to switch focus in DevTools
    0 讨论(0)
  • 2020-12-12 22:23

    hit f6 to focus on address bar, hit return or f5 to refresh, then hit tab to focus on the browser window elements...

    It's roundabout and probably doesn't help in all cases, but if you're testing tab index or something and don't like to use your mouse, this is the only way I figured out how to switch back without closing the console.

    0 讨论(0)
  • 2020-12-12 22:24

    There isn't a way to switch from the dev pane to the window, but cmd r accomplishes what was needed (a refresh of the page).

    0 讨论(0)
提交回复
热议问题