All keyboard shortcuts - Firefox Developer Tools 编辑

This page lists all keyboard shortcuts used by the developer tools built into Firefox.

The first section lists the shortcut for opening each tool and the second section lists shortcuts that are applicable to the Toolbox itself. After that there's one section for each tool, which lists the shortcuts that you can use within that tool.

Because access keys are locale-dependent, they're not documented in this page.

Opening and closing tools

These shortcuts work in the main browser window to open the specified tool. The same shortcuts will work to close tools hosted in the Toolbox, if the tool is active. For tools like the Browser Console that open in a new window, you have to close the window to close the tool.

CommandWindowsmacOSLinux
Open Toolbox (with the most recent tool activated)Ctrl + Shift + ICmd + Opt + ICtrl + Shift + I
Bring Toolbox to foreground (if the Toolbox is in a separate window and not in foreground)Ctrl + Shift + I or F12Cmd + Opt + I or F12Ctrl + Shift + I or F12
Close Toolbox (if the Toolbox is in a separate window and in foreground)Ctrl + Shift + I or F12Cmd + Opt + I or F12Ctrl + Shift + I or F12
Open Web Console 1Ctrl + Shift + KCmd + Opt + KCtrl + Shift + K
Toggle "Pick an element from the page" (opens the Toolbox and/or focus the Inspector tab)Ctrl + Shift + CCmd + Opt + CCtrl + Shift + C
Open Style EditorShift + F7Shift + F7 *Shift + F7
Open ProfilerShift + F5Shift + F5 *Shift + F5
Open Network Monitor 2Ctrl + Shift + ECmd + Opt + ECtrl + Shift + E
Toggle Responsive Design ModeCtrl + Shift + MCmd + Opt + MCtrl + Shift + M
Open Browser ConsoleCtrl + Shift + JCmd + Shift + JCtrl + Shift + J
Open Browser ToolboxCtrl + Alt + Shift + ICmd + Opt + Shift + ICtrl + Alt + Shift + I
Open ScratchpadShift + F4Shift + F4 *Shift + F4
Open WebIDEShift + F8Shift + F8 *Shift + F8
Storage InspectorShift + F9Shift + F9 *Shift + F9
Open Debugger 3Ctrl + Shift + ZCmd + Opt + ZCtrl + Shift + Z

1. Unlike the other toolbox-hosted tools, this shortcut does not also close the Web Console. Instead, it focuses on the Web Console's command line. To close the Web Console, use the global toolbox shortcut of Ctrl + Shift + I (Cmd + Opt + I on a Mac).

2. Before Firefox 55, the keyboard shortcut was Ctrl + Shift + Q (Cmd + Opt + Q on a Mac).

3. Starting in Firefox 71. Before Firefox 66, the letter in this shortcut was S.

Toolbox

These shortcuts work whenever the toolbox is open, no matter which tool is active.

CommandWindowsmacOSLinux
Cycle through tools left to rightCtrl + ]Cmd + ]Ctrl + ]
Cycle through tools right to leftCtrl + [Cmd + [Ctrl + [
Toggle between active tool and settings.F1F1F1

Toggle toolbox between the last 2 docking modes

Ctrl + Shift + DCmd + Shift + DCtrl + Shift + D
Toggle split console (except if console is the currently selected tool)EscEscEsc

These shortcuts work in all tools that are hosted in the toolbox.

CommandWindowsmacOSLinux
Increase font sizeCtrl + +Cmd + +Ctrl + +
Decrease font sizeCtrl + -Cmd + -Ctrl + -
Reset font sizeCtrl + 0Cmd + 0Ctrl + 0

Source editor

This table lists the default shortcuts for the source editor.

In the Editor Preferences section of the developer tools settings, you can choose to use Vim, Emacs, or Sublime Text key bindings instead.

To select these, visit about:config, select the setting devtools.editor.keymap, and assign "vim" or "emacs", or "sublime" to that setting. If you do this, the selected bindings will be used for all the developer tools that use the source editor. You need to reopen the editor for the change to take effect.

From Firefox 33 onwards, the key binding preference is exposed in the Editor Preferences section of the developer tools settings, and you can set it there instead of about:config.

CommandWindowsmacOSLinux
Go to lineCtrl + J, Ctrl + GCmd + J, Cmd + GCtrl + J, Ctrl + G
Find in fileCtrl + FCmd + FCtrl + F
Select allCtrl + ACmd + ACtrl + A
CutCtrl + XCmd + XCtrl + X
CopyCtrl + CCmd + CCtrl + C
PasteCtrl + VCmd + VCtrl + V
UndoCtrl + ZCmd + ZCtrl + Z
RedoCtrl + Shift + Z / Ctrl + YCmd + Shift + Z / Cmd + YCtrl + Shift + Z / Ctrl + Y
IndentTabTabTab
UnindentShift + TabShift + TabShift + Tab
Move line(s) upAlt + UpAlt + UpAlt + Up
Move line(s) downAlt + DownAlt + DownAlt + Down
Comment/uncomment line(s)Ctrl + /Cmd + /Ctrl + /

Page Inspector

CommandWindowsmacOSLinux
Inspect ElementCtrl + Shift + CCmd + Shift + CCtrl + Shift + C

Node picker

These shortcuts work while the node picker is active.

CommandWindowsmacOSLinux
Select the element under the mouse and cancel picker modeClickClickClick
Select the element under the mouse and stay in picker modeShift+ClickShift+ClickShift+Click

HTML pane

These shortcuts work while you're in the Inspector's HTML pane.

CommandWindowsmacOSLinux
Delete the selected nodeDeleteDeleteDelete
Undo delete of a nodeCtrl + ZCmd + ZCtrl + Z
Redo delete of a nodeCtrl + Shift + Z / Ctrl + YCmd + Shift + Z / Cmd + YCtrl + Shift + Z / Ctrl + Y
Move to next node (expanded nodes only)Down arrowDown arrowDown arrow
Move to previous nodeUp arrowUp arrowUp arrow
Move to first node in the tree.HomeHomeHome
Move to last node in the tree.EndEndEnd
Expand currently selected nodeRight arrowRight arrowRight arrow
Collapse currently selected nodeLeft arrowLeft arrowLeft arrow
(When a node is selected) move inside the node so you can start stepping through attributes.EnterReturnEnter
Step forward through the attributes of a nodeTabTabTab
Step backward through the attributes of a nodeShift + TabShift + TabShift + Tab
(When an attribute is selected) start editing the attributeEnterReturnEnter
Hide/show the selected nodeHHH
Focus on the search box in the HTML paneCtrl + FCmd + FCtrl + F
Edit as HTMLF2F2F2
Stop editing HTMLF2 / Ctrl +EnterF2 / Cmd + ReturnF2 / Ctrl + Enter
Copy the selected node's outer HTMLCtrl + CCmd + CCtrl + C
Scroll the selected node into viewSSS
Find the next match in the markup, when searching is activeEnterReturnEnter
Find the previous match in the markup, when searching is activeShift + EnterShift + ReturnShift + Enter

These shortcuts work when the breadcrumbs bar is focused.

CommandWindowsmacOSLinux
Move to the previous element in the breadcrumbs bar Left arrowLeft arrowLeft arrow
Move to the next element in the breadcrumbs bar Right arrowRight arrowRight arrow
Focus the HTML paneShift + TabShift + TabShift + Tab
Focus the CSS paneTabTabTab

CSS pane

These shortcuts work when you're in the Inspector's CSS pane.

CommandWindowsmacOSLinux
Focus on the search box in the CSS paneCtrl + FCmd + FCtrl + F
Clear search box content (only when the search box is focused, and content has been entered)EscEscEsc
Step forward through properties and valuesTabTabTab
Step backward through properties and valuesShift + TabShift + TabShift + Tab
Start editing property or value (Rules view only, when a property or value is selected, but not already being edited)Enter or SpaceReturn or SpaceEnter or Space
Cycle up and down through auto-complete suggestions (Rules view only, when a property or value is being edited)Up arrow , Down arrowUp arrow , Down arrowUp arrow , Down arrow
Choose current auto-complete suggestion (Rules view only, when a property or value is being edited)Enter or TabReturn or TabEnter or Tab
Increment selected value by 1Up arrowUp arrowUp arrow
Decrement selected value by 1Down arrowDown arrowDown arrow
Increment selected value by 100Shift + Page UpShift + Page UpShift + Page Up
Decrement selected value by 100Shift + Page DownShift + Page DownShift + Page Down
Increment selected value by 10Shift + Up arrowShift + Up arrowShift + Up arrow
Decrement selected value by 10Shift + Down arrowShift + Down arrowShift + Down arrow
Increment selected value by 0.1Alt + Up arrow (Ctrl + Up arrow from Firefox 60 onwards.)Alt + Up arrowAlt + Up arrow (Ctrl + Up arrow from Firefox 60 onwards.)
Decrement selected value by 0.1Alt + Down arrow (Ctrl + Down arrow from Firefox 60 onwards).Alt + Down arrowAlt + Down arrow (Ctrl + Down arrow from Firefox 60 onwards).
Show/hide more information about current property (Computed view only, when a property is selected)Enter or SpaceReturn or SpaceEnter or Space
Open MDN reference page about current property (Computed view only, when a property is selected)F1F1F1
Open current CSS file in Style Editor (Computed view only, when more information is shown for a property and a CSS file reference is focused).EnterReturnEnter

Debugger

CommandWindowsmacOSLinux
Close current fileCtrl + WCmd + WCtrl + W
Search for a string in the current fileCtrl + FCmd + FCtrl + F
Search for a string in all filesCtrl + Shift + FCmd + Shift + FCtrl + Shift + F
Find next in the current fileCtrl + GCmd + GCtrl + G
Search for scripts by nameCtrl + PCmd + PCtrl + P
Resume execution when at a breakpointF8F8 1F8
Step overF10F10 1F10
Step intoF11F11 1F11
Step outShift + F11Shift + F11 1Shift + F11
Toggle breakpoint on the currently selected lineCtrl + BCmd + BCtrl + B
Toggle conditional breakpoint on the currently selected lineCtrl + Shift + BCmd + Shift + BCtrl + Shift + B

1. By default, on some Macs, the function key is remapped to use a special feature: for example, to change the screen brightness or the volume. See this guide to using these keys as standard function keys. To use a remapped key as a standard function key, hold the Function key down as well (so to open the Profiler, use Shift + Function + F5).

Note: Before Firefox 66, the combination Ctrl + Shift + S on Windows and Linux or Cmd + Opt + S on macOS would open/close the Debugger. From Firefox 66 and later, this is no longer the case.

Web Console

CommandWindowsmacOSLinux
Open the Web ConsoleCtrl + Shift + KCmd + Opt + KCtrl + Shift + K
Search in the message display paneCtrl + FCmd + FCtrl + F
Open the object inspector paneCtrl + ClickCtrl + ClickCtrl + Click
Clear the object inspector paneEscEscEsc
Focus on the command lineCtrl + Shift + KCmd + Opt + KCtrl + Shift + K
Clear output

Ctrl + Shift + L

Ctrl + L

From Firefox 67:

Cmd + K

Ctrl + Shift + L

Command line interpreter

These shortcuts apply when you're in the command line interpreter.

CommandWindowsmacOSLinux
Scroll to start of console output (only if the command line is empty)HomeHomeHome
Scroll to end of console output (only if the command line is empty)EndEndEnd
Page up through console outputPage upPage upPage up
Page down through console outputPage downPage downPage down
Go backward through command historyUp arrowUp arrowUp arrow
Go forward through command historyDown arrowDown arrowDown arrow
Initiate reverse search through command history/step backwards through matching commandsF9Ctrl + RF9
Step forward through matching command history (after initiating reverse search)Shift + F9Ctrl + SShift + F9
Move to the beginning of the lineHomeCtrl + ACtrl + A
Move to the end of the lineEndCtrl + ECtrl + E
Execute the current expressionEnterReturnEnter
Add a new line, for entering multiline expressionsShift + EnterShift + ReturnShift + Enter

Autocomplete popup

These shortcuts apply while the autocomplete popup is open:

CommandWindowsmacOSLinux
Choose the current autocomplete suggestionTabTabTab
Cancel the autocomplete popupEscEscEsc
Move to the previous autocomplete suggestionUp arrowUp arrowUp arrow
Move to the next autocomplete suggestionDown arrowDown arrowDown arrow
Page up through autocomplete suggestionsPage upPage upPage up
Page down through autocomplete suggestionsPage downPage downPage down
Scroll to start of autocomplete suggestionsHomeHomeHome
Scroll to end of autocomplete suggestionsEndEndEnd

Style Editor

CommandWindowsmacOSLinux
Open the Style EditorShift + F7Shift + F7Shift + F7
Open autocomplete popupCtrl + SpaceCmd + SpaceCtrl + Space

Scratchpad

CommandWindowsmacOSLinux
Open the ScratchpadShift + F4Shift + F4Shift + F4
Run Scratchpad codeCtrl + RCmd + RCtrl + R
Run Scratchpad code, display the result in the object inspectorCtrl + ICmd + ICtrl + I
Run Scratchpad code, insert the result as a commentCtrl + LCmd + LCtrl + L
Re-evaluate current functionCtrl + ECmd + ECtrl + E
Reload the current page, then run Scratchpad codeCtrl + Shift + RCmd + Shift + RCtrl + Shift + R
Save the padCtrl + SCmd + SCtrl + S
Open an existing padCtrl + OCmd + OCtrl + O
Create a new padCtrl + NCmd + NCtrl + N
Close ScratchpadCtrl + WCmd + WCtrl + W
Pretty print the code in ScratchpadCtrl + PCmd + PCtrl + P
Show autocomplete suggestionsCtrl + SpaceCtrl + SpaceCtrl + Space
Show inline documentationCtrl + Shift + SpaceCtrl + Shift + SpaceCtrl + Shift + Space

Eyedropper

CommandWindowsmacOSLinux
Select the current colorEnterReturnEnter
Dismiss the EyedropperEscEscEsc
Move by 1 pixelArrow keysArrow keysArrow keys
Move by 10 pixelsShift + arrow keysShift + arrow keysShift + arrow keys

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:94 次

字数:38550

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文