WebStorm keyboard shortcuts
WebStorm is JetBrains' IDE for JavaScript and TypeScript. PhpStorm uses the same default keys, so this list serves both.
Most used WebStorm keyboard shortcuts
The WebStorm shortcuts worth learning first. The full list follows, grouped by task.
- Search everywhereMacShift,ShiftWindowsShift,ShiftLinuxShift,Shift
- Find an actionMacShiftCmdAWindowsCtrlShiftALinuxCtrlShiftA
- Go to a fileMacShiftCmdOWindowsCtrlShiftNLinuxCtrlShiftN
- Show intention actions and quick fixesMacOptionEnterWindowsAltEnterLinuxAltEnter
- Reformat codeMacOptionCmdLWindowsCtrlAltLLinuxCtrlAltL
- RenameMacShiftF6WindowsShiftF6LinuxShiftF6
- Find usagesMacOptionF7WindowsAltF7LinuxAltF7
- Go to the declarationMacCmdBWindowsCtrlBLinuxCtrlB
- Insert a live templateMacCmdJWindowsCtrlJLinuxCtrlJ
- Run the current fileMacCtrlShiftRWindowsCtrlShiftF10LinuxCtrlShiftF10
- TerminalMacOptionF12WindowsAltF12LinuxAltF12
Search and navigation
14 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Search everywhere | Shift,Shift | Shift,Shift | Shift,Shift |
| Find an action | ShiftCmdA | CtrlShiftA | CtrlShiftA |
| Go to a file | ShiftCmdO | CtrlShiftN | CtrlShiftN |
| Go to a symbol | OptionCmdO | CtrlAltShiftN | CtrlAltShiftN |
| Recent files | CmdE | CtrlE | CtrlE |
| Recent locations | ShiftCmdE | CtrlShiftE | CtrlShiftE |
| Go to the declaration | CmdB | CtrlB | CtrlB |
| Find usages | OptionF7 | AltF7 | AltF7 |
| File structure | CmdF12 | CtrlF12 | CtrlF12 |
| Go to a line | CmdL | CtrlG | CtrlG |
| Back | Cmd[ | CtrlAlt← | CtrlAlt← |
| Next error | F2 | F2 | F2 |
| Previous error | ShiftF2 | ShiftF2 | ShiftF2 |
| Find in files | ShiftCmdF | CtrlShiftF | CtrlShiftF |
Editing
17 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Show intention actions and quick fixes | OptionEnter | AltEnter | AltEnter |
| Basic completion | CtrlSpace | CtrlSpace | CtrlSpace |
| Insert a live template | CmdJ | CtrlJ | CtrlJ |
| Surround with a template | OptionCmdJ | CtrlAltJ | CtrlAltJ |
| Reformat code | OptionCmdL | CtrlAltL | CtrlAltL |
| Optimize imports | CtrlOptionO | CtrlAltO | CtrlAltO |
| Comment with line comment | Cmd/ | Ctrl/ | Ctrl/ |
| Comment with block comment | OptionCmd/ | CtrlShift/ | CtrlShift/ |
| Duplicate the line | CmdD | CtrlD | CtrlD |
| Delete the line | CmdBackspace | CtrlY | CtrlY |
| Move the statement up | ShiftCmd↑ | CtrlShift↑ | CtrlShift↑ |
| Move the statement down | ShiftCmd↓ | CtrlShift↓ | CtrlShift↓ |
| Extend the selection | Option↑ | CtrlW | CtrlW |
| Add the next occurrence | CtrlG | AltJ | AltJ |
| Parameter info | CmdP | CtrlP | CtrlP |
| Quick documentation | F1 | CtrlQ | CtrlQ |
| Join lines | CtrlShiftJ | CtrlShiftJ | CtrlShiftJ |
Refactoring
5 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Rename | ShiftF6 | ShiftF6 | ShiftF6 |
| Extract variable | OptionCmdV | CtrlAltV | CtrlAltV |
| Extract function | OptionCmdM | CtrlAltM | CtrlAltM |
| Inline | OptionCmdN | CtrlAltN | CtrlAltN |
| Refactor this | CtrlT | CtrlAltShiftT | CtrlAltShiftT |
Run and tools
10 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Run the current file | CtrlShiftR | CtrlShiftF10 | CtrlShiftF10 |
| Run the last configuration | CtrlR | ShiftF10 | ShiftF10 |
| Debug the last configuration | CtrlD | ShiftF9 | ShiftF9 |
| Toggle a breakpoint | CmdF8 | CtrlF8 | CtrlF8 |
| Step overDebugging | F8 | F8 | F8 |
| Step intoDebugging | F7 | F7 | F7 |
| Terminal | OptionF12 | AltF12 | AltF12 |
| Project tool window | Cmd1 | Alt1 | Alt1 |
| Commit | CmdK | CtrlK | CtrlK |
| Settings | Cmd, | CtrlAltS | CtrlAltS |
No shortcuts match. Try fewer words, the key names only, or search every app.
Show the key map: which keys WebStorm uses mostDarker orange = used by more shortcuts
WebStorm editing shortcuts: format, comment, duplicate and delete lines
- Comment with block commentMacOptionCmd/WindowsCtrlShift/LinuxCtrlShift/
- Duplicate the lineMacCmdDWindowsCtrlDLinuxCtrlD
- Delete the lineMacCmdBackspaceWindowsCtrlYLinuxCtrlY
- Move the statement upMacShiftCmd↑WindowsCtrlShift↑LinuxCtrlShift↑
- Move the statement downMacShiftCmd↓WindowsCtrlShift↓LinuxCtrlShift↓
- Extend the selectionMacOption↑WindowsCtrlWLinuxCtrlW
- Add the next occurrenceMacCtrlGWindowsAltJLinuxAltJ
- Join linesMacCtrlShiftJWindowsCtrlShiftJLinuxCtrlShiftJ
- Surround with a templateMacOptionCmdJWindowsCtrlAltJLinuxCtrlAltJ
- Live templates
- Type an abbreviation such as log and press Tab to expand it to console.log(); the full list is in Settings > Editor > Live Templates, where you can add your own.
Completion, documentation and refactoring in WebStorm
- Basic completionMacCtrlSpaceWindowsCtrlSpaceLinuxCtrlSpace
- Parameter infoMacCmdPWindowsCtrlPLinuxCtrlP
- Quick documentationMacF1WindowsCtrlQLinuxCtrlQ
- Extract variableMacOptionCmdVWindowsCtrlAltVLinuxCtrlAltV
- Extract functionMacOptionCmdMWindowsCtrlAltMLinuxCtrlAltM
- InlineMacOptionCmdNWindowsCtrlAltNLinuxCtrlAltN
- Refactor thisMacCtrlTWindowsCtrlAltShiftTLinuxCtrlAltShiftT
Run, debug, terminal and Git in WebStorm
- Run the last configurationMacCtrlRWindowsShiftF10LinuxShiftF10
- Debug the last configurationMacCtrlDWindowsShiftF9LinuxShiftF9
- Toggle a breakpointMacCmdF8WindowsCtrlF8LinuxCtrlF8
- Step overMacF8WindowsF8LinuxF8
- Step intoMacF7WindowsF7LinuxF7
- Project tool windowMacCmd1WindowsAlt1LinuxAlt1
- CommitMacCmdKWindowsCtrlKLinuxCtrlK
- SettingsMacCmd,WindowsCtrlAltSLinuxCtrlAltS
- Run an npm script
- Open package.json and click the green arrow beside a script, or use the npm tool window; once run, Shift+F10 (Ctrl+R on Mac) runs it again.
Change WebStorm shortcuts in Settings > Keymap
Settings > Keymap (Ctrl+Alt+S, or Cmd+Comma on Mac) lists every WebStorm shortcut, and PhpStorm, Rider and the other JetBrains IDEs use the same screen. The full steps are in changing the IntelliJ IDEA keymap.
- Find an action by its keys
- Click the magnifier with a keyboard in the Keymap search box and press a combination to see which action uses it, useful before adding a shortcut for a live template or an npm script.
WebStorm keyboard shortcuts: questions
- Does PhpStorm have the same shortcuts as WebStorm?
- Yes. Both use the JetBrains default keymap, so every key here works in PhpStorm, IntelliJ IDEA and the other JetBrains IDEs.
These are the default key bindings in WebStorm 2025.2, as published by JetBrains. Shortcuts that need an extension, an add-in or a changed keymap are left out. Where two combinations do the same thing, both are shown.
Single-system lists: WebStorm keyboard shortcuts for Mac, WebStorm keyboard shortcuts for Windows, WebStorm keyboard shortcuts for Linux.
Each shortcut has its own page with the keys for every system, related shortcuts and the same action in other apps. The printable cheat sheet fits the whole list on one or two pages.