PyCharm Keyboard Shortcut Keys: Complete List (With Functions Explained)

PyCharm is JetBrains' Python IDE, so it shares the platform's shortcut DNA and adds Python-specific powers: running the current file in one chord, a scientific/Python console, and refactorings that understand Python. This complete list of PyCharm keyboard shortcut keys (Windows/Linux keymap) explains navigation, Python run shortcuts, editing and debugging in plain words.

Search and Navigation Shortcuts

Shortcut KeyFunction
Shift, Shift (double Shift)Search Everywhere (files, classes, functions, actions)
Ctrl + Shift + AFind Action
Ctrl + NGo to Class
Ctrl + Shift + NGo to File
Ctrl + Alt + Shift + NGo to Symbol (functions and variables across the project)
Ctrl + ERecent Files popup
Ctrl + BGo to Declaration (of a function, class or variable)
Ctrl + Alt + BGo to Implementation
Ctrl + UGo to the super class method
Ctrl + Alt + Left / RightNavigate back / forward
Ctrl + GGo to a line number
Ctrl + F12File Structure popup (functions of this file)
Alt + F7Find Usages
Ctrl + Alt + F7Show Usages popup
Alt + Up / Down ArrowPrevious / next function or method
Ctrl + [ / ]Move to the block start / end
Ctrl + TabSwitcher between files and tool windows

Python Run Shortcuts

Shortcut KeyFunction
Ctrl + Shift + F10Run the current file (creates a configuration for it)
Shift + F10Run the selected configuration
Shift + F9Debug the selected configuration
Alt + Shift + F10Choose a configuration and run it
Alt + Shift + F9Choose a configuration and debug it
Ctrl + F5Rerun the last run/debug session
Ctrl + F2Stop the running process
Alt + F12Open the Terminal (in the project environment)
Ctrl + Alt + ROpen the Run Anything / manage configurations popup (newer versions)
Alt + Shift + EExecute the selected code in the Python Console (from the editor)

Editing and Refactoring Shortcuts

Shortcut KeyFunction
Ctrl + SpaceCode completion
Ctrl + Shift + SpaceSmart (type-aware) completion
Ctrl + Shift + EnterComplete the statement
Alt + EnterShow intention actions (fix imports, create functions, add type hints…)
Ctrl + PParameter info for the function call
Ctrl + QQuick documentation (docstring popup)
Ctrl + /Comment / uncomment lines with #
Ctrl + Shift + /Block comment toggle contexts
Ctrl + DDuplicate the line or selection
Ctrl + YDelete the line
Ctrl + W / Ctrl + Shift + WExtend / shrink the selection
Shift + F6Rename (variables, functions, modules — with references)
Ctrl + Alt + Shift + TRefactor This menu
Ctrl + Alt + MExtract Method
Ctrl + Alt + VExtract Variable
Ctrl + Alt + PExtract Parameter
Ctrl + Alt + NInline the variable/method
Ctrl + Alt + LReformat code (PEP 8 by default)
Ctrl + Alt + OOptimize imports (sort and remove unused)
F6Move a module/class/function
Alt + DeleteSafe Delete

Debug and General Shortcuts

Shortcut KeyFunction
F8Step over
F7Step into
Shift + F7Smart step into
Shift + F8Step out
Alt + F9Run to the cursor
Alt + F8Evaluate an expression
F9Resume
Ctrl + F8Toggle a breakpoint
Ctrl + Shift + F8View breakpoints
Ctrl + F9Make/build the project (checks)
Ctrl + FFind in the file
Ctrl + RReplace in the file
Ctrl + Shift + FFind in Path (whole project)
Ctrl + Shift + RReplace in Path
Ctrl + KCommit (VCS)
Ctrl + TUpdate from VCS
Ctrl + Shift + KPush
Ctrl + Alt + SOpen Settings (interpreter, packages…)
Ctrl + Shift + F12Maximize the editor
EscFocus the editor

Tips for PyCharm Users

Ctrl + Shift + F10 is the Python workflow in one chord: wherever your caret is, PyCharm figures out the runnable context (script, test) and runs it. Alt + Enter deserves daily use — it adds missing imports, creates stub functions and applies type hints contextually. For exploratory work, select any code and press Alt + Shift + E to run it in the Python Console while the file stays untouched — the fastest way to test an idea.

Frequently Asked Questions

How do I run the current Python file in PyCharm?

Press Ctrl + Shift + F10. PyCharm creates a run configuration for the file and runs it; after that, Shift + F10 reruns it and Ctrl + F5 repeats the last run.

How do I rename a variable in PyCharm?

Put the caret on it and press Shift + F6 — every reference in the project updates, including in strings if you choose.

How do I fix imports automatically in PyCharm?

Press Ctrl + Alt + O to optimize imports across the file, or put the caret on a red (unresolved) name and press Alt + Enter to import it.

How do I reformat Python code to PEP 8?

Press Ctrl + Alt + L — PyCharm reformats the file or selection using the project's code style (PEP 8 by default).

By Umar Farooq, Tech Know.

Post a Comment

0 Comments