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 shortcuts

Search and navigation

Search commands find actions, files, symbols, and recent work without leaving the editor. These are the fastest way to move through a large project.

ActionWindowsLinuxmacOS
Search EverywhereShiftShiftShiftShiftShiftShift
Find ActionCtrlShiftACtrlShiftACmdShiftA
Show the Project windowAlt1Alt1Cmd1
Open Recent FilesCtrlECtrlECmdE
Find UsagesAltF7AltF7OptionF7
Select InAltF1AltF1OptionF1
Open SettingsCtrlAltSCtrlAltSCmd,
Open the VCS Operations popupAlt`Alt`CtrlV

Basic editing

Basic editing keys apply to the current selection or line. PyCharm's keymap can change them, especially when another installed keymap is active.

ActionWindowsLinuxmacOS
CutCtrlXCtrlXCmdX
CopyCtrlCCtrlCCmdC
PasteCtrlVCtrlVCmdV
Paste from HistoryCtrlShiftVCtrlShiftVCmdShiftV
Save AllCtrlSCtrlSCmdS
UndoCtrlZCtrlZCmdZ
RedoCtrlShiftZCtrlShiftZCmdShiftZ
Indent selectionTabTabTab
Unindent line or selectionShiftTabShiftTabShiftTab
Auto-indent linesCtrlAltICtrlAltICtrlOptionI
Start a new lineShiftEnterShiftEnterShiftEnter
Start a new line before the current lineCtrlAltEnterCtrlAltEnterCmdOptionEnter
Delete lineCtrlYCtrlYCmdBackspace
Join linesCtrlShiftJCtrlShiftJCmdShiftJ
Duplicate line or selectionCtrlDCtrlDCmdD
Toggle caseCtrlShiftUCtrlShiftUCmdShiftU

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.

ActionWindowsLinuxmacOS
RebuildCtrlShiftF9CtrlShiftF9CmdShiftF9
Show Intention ActionsAltEnterAltEnterOptionEnter
GenerateAltInsertAltInsertCmdN
Run AnythingCtrlCtrlCtrlCtrlCtrlCtrl
DebugAltShiftF9AltShiftF9CtrlOptionD
View BreakpointsCtrlShiftF8CtrlShiftF8CmdShiftF8
Attach to ProcessCtrlAltF5CtrlAltF5CmdOptionF5
Refactor ThisCtrlAltShiftTCtrlAltShiftTCtrlOptionShiftT
Reformat CodeCtrlAltLCtrlAltLCmdOptionL
Build ProjectCtrlF9CtrlF9CmdF9
Create new item in the current directoryCtrlAltInsertCtrlAltInsertCmdOptionN
Copy PathsCtrlShiftCCtrlShiftCCmdShiftC

Editor navigation

Editor navigation keeps the code pane in focus while changing windows, tabs, and the active editor area.

ActionWindowsLinuxmacOS
Maximize the editor paneCtrlShiftF12CtrlShiftF12CmdShiftF12
Switch focus to the editorEscapeEscapeEscape
Create a scratch fileCtrlAltShiftInsertCtrlAltShiftInsertCmdOptionShiftInsert
Open source in a new windowShiftF4ShiftF4ShiftF4
Increase font size in all editorsAltShift.AltShift.OptionShift.
Decrease font size in all editorsAltShift,AltShift,OptionShift,

Make a printable PyCharm sheet