PyCharm Keyboard Shortcuts

A deep PyCharm shortcuts guide for Python navigation, refactor, debugging, and testing.

PyCharm Keyboard Shortcuts banner

Search & Navigation (Mac)

Key / CodeDescription
Shift + ShiftSearch everywhere
Cmd + OGo to class
Cmd + Shift + OGo to file
Cmd + Option + OGo to symbol
Cmd + ERecent files

Search & Navigation (Windows/Linux)

Key / CodeDescription
Shift + ShiftSearch everywhere
Ctrl + NGo to class
Ctrl + Shift + NGo to file
Ctrl + Alt + Shift + NGo to symbol
Ctrl + ERecent files

Editing

Key / CodeDescription
Cmd/Ctrl + /Line comment
Cmd/Ctrl + Shift + /Block comment
Option/Alt + EnterShow intention actions
Cmd/Ctrl + Option/Alt + LReformat code
Cmd/Ctrl + DDuplicate line/selection

Refactor

Key / CodeDescription
Shift + F6Rename
Cmd/Ctrl + Option/Alt + VExtract variable
Cmd/Ctrl + Option/Alt + MExtract method
Cmd/Ctrl + Option/Alt + CExtract constant
Cmd/Ctrl + Option/Alt + NInline

Debugging

Key / CodeDescription
Ctrl + D (Mac)Debug
Shift + F9Debug
F8Step over
F7Step into
Shift + F8Step out
Cmd/Ctrl + F8Toggle breakpoint

Testing

Key / CodeDescription
Ctrl + Shift + F10Run test in context
Ctrl + Shift + F9Debug test in context
Alt + Shift + F10Select run configuration

Pro Workflow

Daily loop: search → quick fix → refactor → run tests.

Shift + Shift  # search
Alt/Option + Enter  # quick fix
Shift + F6  # rename
Ctrl + Shift + F10  # run tests
Knowledge is power.