Skip to content

macOS default keymap

Remember these Shortcuts

  • Smart code completion Control ⌃ Shift ⇧ Space
  • Search everywhere Double Shift ⇧
    • Go to class Command ⌘O
    • Go to file Command ⌘Shift ⇧O
    • Go to symbol Command ⌘Option ⌥O
    • Go to file Command ⌘Shift ⇧A
  • Show intention actions and quick-fixes Command ⌘Return ⮨
  • Generate code Command ⌘N or Control ⌃Return ⮨
  • Parameter info Command ⌘P
  • Extend selection Option ⌥Command ⌘Up 🠕
  • Shrink selection Option ⌥Command ⌘Down 🠗
  • Recent files popup Command ⌘E
  • Rename Shift ⇧F6

General

  • Open corresponding tool window Command ⌘0 ... Command ⌘9
  • Save all Command ⌘S
  • Synchronize Command ⌘Option ⌥Y
  • Toggle maximizing editor Command ⌘Shift ⇧F12
  • Inspect current file with current profile Option ⌥Shift ⇧I
  • Quick switch current scheme Control ⌃§ or Control ⌃`
  • Open Settings dialog Command ⌘,
  • Open Project Structure dialog Command ⌘;
  • Find Action Command ⌘Shift ⇧A

Debugging

  • Step over/into F8 / F7
  • Smart step into/Step out Shift ⇧F7 / Shift ⇧F8
  • Run to cursor Option ⌥F9
  • Evaluate expression Option ⌥F8
  • Resume program Command ⌘Option ⌥R
  • Toggle breakpoint Command ⌘F8
  • View breakpoints Command ⌘Shift ⇧F8

Search / Replace

  • Search everywhere Double Shift ⇧
  • Find Command ⌘F
  • Find next/previous Command ⌘G / Command ⌘Shift ⇧G
  • Replace Command ⌘R
  • Find in path Command ⌘Shift ⇧F
  • Replace in path Command ⌘Shift ⇧R
  • Select next occurrence Control ⌃G
  • Select all occurrences Control ⌃Shift ⇧G
  • Unselect occurrence Control ⌃G

Editing

  • Basic code completion Control ⌃Shift ⇧Space
  • Smart code completion Control ⌃Space
  • Complete statement Command ⌘Shift ⇧Return ⮨
  • Parameter info (within method call arguments) Command ⌘P
  • Quick documentation lookup Control ⌃J
  • External Doc Shift ⇧F1
  • Brief Info Command ⌘ + mouse
  • Show descriptions of error at caret Command ⌘F1
  • Generate code... Command ⌘N or Control ⌃Return ⮨
  • Override methods Control ⌃O
  • Implement methods Control ⌃I
  • Surround with…  Command ⌘Option ⌥T
  • Comment/uncomment with line comment Command ⌘/
  • Comment/uncomment with block comment Command ⌘Option ⌥/
  • Extend selection Option ⌥Up 🠕
  • Shrink selection Option ⌥Down 🠗
  • Context info Control ⌃Shift ⇧Q
  • Show intention actions and quick-fixes Option ⌥Return ⮨
  • Reformat code Command ⌘Option ⌥L
  • Optimize imports Control ⌃Option ⌥O
  • Auto-indent line(s) Control ⌃Option ⌥I
  • Indent/unindent selected lines Right ⭲/Shift ⇧Right ⭲
  • Cut current line to clipboard Command ⌘X
  • Copy current line to clipboard Command ⌘C
  • Paste from clipboard Command ⌘V
  • Paste from recent buffers... Command ⌘Shift ⇧V
  • Duplicate current line Command ⌘D
  • Delete line at caret Command ⌘Backspace ⌫
  • Smart line join Control ⌃Shift ⇧J
  • Smart line split Command ⌘Return ⮨
  • Start new line Shift ⇧Return ⮨
  • Toggle case for word at caret or selected block Command ⌘Shift ⇧U
  • Select till code block end /start Command ⌘Shift ⇧] / Command ⌘Shift ⇧[
  • Delete to word end Option ⌥Backspace ⌫
  • Delete to word start Option ⌥Backspace ⌫
  • Expand/collapse code block Command ⌘+ / Command ⌘-
  • Expand all Command ⌘Shift ⇧+
  • Collapse all Command ⌘Shift ⇧-
  • Close active editor tab Command ⌘W

Refactoring

  • Copy F5
  • Move F6
  • Safe Delete Command ⌘Delete
  • Rename Shift ⇧F6
  • Refactor this Control ⌃T
  • Change Signature Shift ⇧F6
  • Inline Command ⌘Option ⌥N
  • Extract Method Command ⌘Option ⌥M
  • Extract Variable Command ⌘Option ⌥V
  • Extract Field Command ⌘Option ⌥F
  • Extract Constant Command ⌘Option ⌥C
  • Extract Parameter Command ⌘Option ⌥P
  • Go to class Command ⌘O
  • Go to file Command ⌘Shift ⇧O
  • Go to symbol Command ⌘Option ⌥O
  • Go to next/previous editor tab Control ⌃Left ⭰/Control ⌃Right ⭲
  • Go back to previous tool window F12
  • Go to editor (from tool window) Escape ⎋
  • Hide active or last active window Shift ⇧Escape ⎋
  • Go to line Command ⌘L
  • Recent files popup Command ⌘E
  • Navigate back/forward Command ⌘Option ⌥Left ⭰/Command ⌘Option ⌥Right ⭲
  • Navigate to last edit location Command ⌘Shift ⇧Backspace ⌫
  • Select current file or symbol in any view Option ⌥F1
  • Go to declaration Command ⌘B or Command ⌘ Click
  • Go to implementation(s) Command ⌘Option ⌥B
  • Open quick definition lookup Option ⌥Space or Command ⌘Y
  • Go to type declaration Control ⌃Shift ⇧B
  • Go to super-method/super-class Command ⌘U
  • Go to previous/next method Control ⌃Up 🠕/Control ⌃Down 🠗
  • Move to code block end/start Command ⌘] / Command ⌘[
  • File structure popup Command ⌘F12
  • Type hierarchy Control ⌃H
  • Method hierarchy Command ⌘Shift ⇧H
  • Call hierarchy Command ⌘Option ⌥H
  • Next/previous highlighted error F2 / Shift ⇧F2
  • Edit source/View source F4 / Command ⌘Down 🠗
  • Show navigation bar Option ⌥Home
  • Toggle bookmark F3
  • Toggle bookmark with mnemonic Option ⌥F3
  • Go to numbered bookmark Control ⌃0 ... Control ⌃9
  • Show bookmarks Command ⌘F3

Compile and Run

  • Make project Command ⌘F9
  • Compile selected file, package or module Command ⌘Shift ⇧F9
  • Select configuration and run/debug Control ⌃Option ⌥R / Control ⌃Option ⌥D
  • Run/Debug Control ⌃R / Control ⌃D
  • Run/Debug context config. from editor Control ⌃Shift ⇧R / Control ⌃Shift ⇧D
  • Find usages/Find usages in file Option ⌥F7 / Command ⌘F7
  • Highlight usages in file Command ⌘Shift ⇧F7
  • Show usages Command ⌘Option ⌥F7

VCS / Local History

  • Commit project to VCS Command ⌘K
  • Update project from VCS Command ⌘T
  • Push commits Command ⌘Shift ⇧K
  • ‘VCS’ quick popup Control ⌃V

Live Templates

  • Surround with Live Template Command ⌘Option ⌥J
  • Insert Live Template Command ⌘J

NOTICE

Initial version from IntelliJ IDEA Reference Card