PyCharm keyboard shortcuts
PyCharm's keymap reference groups the actions developers reach for while searching, editing, navigating, building, and debugging Python projects. This page keeps those actions together and shows the Windows, Linux, and macOS modifier differences.
Windows, Linux, macOS · 42 shortcutsBasic editing
Basic editing keys apply to the current selection or line. PyCharm's keymap can change them, especially when another installed keymap is active.
| Action | Windows | Linux | macOS |
|---|---|---|---|
| Cut | CtrlX | CtrlX | CmdX |
| Copy | CtrlC | CtrlC | CmdC |
| Paste | CtrlV | CtrlV | CmdV |
| Paste from History | CtrlShiftV | CtrlShiftV | CmdShiftV |
| Save All | CtrlS | CtrlS | CmdS |
| Undo | CtrlZ | CtrlZ | CmdZ |
| Redo | CtrlShiftZ | CtrlShiftZ | CmdShiftZ |
| Indent selection | Tab | Tab | Tab |
| Unindent line or selection | ShiftTab | ShiftTab | ShiftTab |
| Auto-indent lines | CtrlAltI | CtrlAltI | CtrlOptionI |
| Start a new line | ShiftEnter | ShiftEnter | ShiftEnter |
| Start a new line before the current line | CtrlAltEnter | CtrlAltEnter | CmdOptionEnter |
| Delete line | CtrlY | CtrlY | CmdBackspace |
| Join lines | CtrlShiftJ | CtrlShiftJ | CmdShiftJ |
| Duplicate line or selection | CtrlD | CtrlD | CmdD |
| Toggle case | CtrlShiftU | CtrlShiftU | CmdShiftU |
Code actions and project work
These commands generate code, reformat it, rebuild a project, and open the actions that change the current symbol or selection.
| Action | Windows | Linux | macOS |
|---|---|---|---|
| Rebuild | CtrlShiftF9 | CtrlShiftF9 | CmdShiftF9 |
| Show Intention Actions | AltEnter | AltEnter | OptionEnter |
| Generate | AltInsert | AltInsert | CmdN |
| Run Anything | CtrlCtrl | CtrlCtrl | CtrlCtrl |
| Debug | AltShiftF9 | AltShiftF9 | CtrlOptionD |
| View Breakpoints | CtrlShiftF8 | CtrlShiftF8 | CmdShiftF8 |
| Attach to Process | CtrlAltF5 | CtrlAltF5 | CmdOptionF5 |
| Refactor This | CtrlAltShiftT | CtrlAltShiftT | CtrlOptionShiftT |
| Reformat Code | CtrlAltL | CtrlAltL | CmdOptionL |
| Build Project | CtrlF9 | CtrlF9 | CmdF9 |
| Create new item in the current directory | CtrlAltInsert | CtrlAltInsert | CmdOptionN |
| Copy Paths | CtrlShiftC | CtrlShiftC | CmdShiftC |