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 Key | Function |
|---|---|
| Shift, Shift (double Shift) | Search Everywhere (files, classes, functions, actions) |
| Ctrl + Shift + A | Find Action |
| Ctrl + N | Go to Class |
| Ctrl + Shift + N | Go to File |
| Ctrl + Alt + Shift + N | Go to Symbol (functions and variables across the project) |
| Ctrl + E | Recent Files popup |
| Ctrl + B | Go to Declaration (of a function, class or variable) |
| Ctrl + Alt + B | Go to Implementation |
| Ctrl + U | Go to the super class method |
| Ctrl + Alt + Left / Right | Navigate back / forward |
| Ctrl + G | Go to a line number |
| Ctrl + F12 | File Structure popup (functions of this file) |
| Alt + F7 | Find Usages |
| Ctrl + Alt + F7 | Show Usages popup |
| Alt + Up / Down Arrow | Previous / next function or method |
| Ctrl + [ / ] | Move to the block start / end |
| Ctrl + Tab | Switcher between files and tool windows |
Python Run Shortcuts
| Shortcut Key | Function |
|---|---|
| Ctrl + Shift + F10 | Run the current file (creates a configuration for it) |
| Shift + F10 | Run the selected configuration |
| Shift + F9 | Debug the selected configuration |
| Alt + Shift + F10 | Choose a configuration and run it |
| Alt + Shift + F9 | Choose a configuration and debug it |
| Ctrl + F5 | Rerun the last run/debug session |
| Ctrl + F2 | Stop the running process |
| Alt + F12 | Open the Terminal (in the project environment) |
| Ctrl + Alt + R | Open the Run Anything / manage configurations popup (newer versions) |
| Alt + Shift + E | Execute the selected code in the Python Console (from the editor) |
Editing and Refactoring Shortcuts
| Shortcut Key | Function |
|---|---|
| Ctrl + Space | Code completion |
| Ctrl + Shift + Space | Smart (type-aware) completion |
| Ctrl + Shift + Enter | Complete the statement |
| Alt + Enter | Show intention actions (fix imports, create functions, add type hints…) |
| Ctrl + P | Parameter info for the function call |
| Ctrl + Q | Quick documentation (docstring popup) |
| Ctrl + / | Comment / uncomment lines with # |
| Ctrl + Shift + / | Block comment toggle contexts |
| Ctrl + D | Duplicate the line or selection |
| Ctrl + Y | Delete the line |
| Ctrl + W / Ctrl + Shift + W | Extend / shrink the selection |
| Shift + F6 | Rename (variables, functions, modules — with references) |
| Ctrl + Alt + Shift + T | Refactor This menu |
| Ctrl + Alt + M | Extract Method |
| Ctrl + Alt + V | Extract Variable |
| Ctrl + Alt + P | Extract Parameter |
| Ctrl + Alt + N | Inline the variable/method |
| Ctrl + Alt + L | Reformat code (PEP 8 by default) |
| Ctrl + Alt + O | Optimize imports (sort and remove unused) |
| F6 | Move a module/class/function |
| Alt + Delete | Safe Delete |
Debug and General Shortcuts
| Shortcut Key | Function |
|---|---|
| F8 | Step over |
| F7 | Step into |
| Shift + F7 | Smart step into |
| Shift + F8 | Step out |
| Alt + F9 | Run to the cursor |
| Alt + F8 | Evaluate an expression |
| F9 | Resume |
| Ctrl + F8 | Toggle a breakpoint |
| Ctrl + Shift + F8 | View breakpoints |
| Ctrl + F9 | Make/build the project (checks) |
| Ctrl + F | Find in the file |
| Ctrl + R | Replace in the file |
| Ctrl + Shift + F | Find in Path (whole project) |
| Ctrl + Shift + R | Replace in Path |
| Ctrl + K | Commit (VCS) |
| Ctrl + T | Update from VCS |
| Ctrl + Shift + K | Push |
| Ctrl + Alt + S | Open Settings (interpreter, packages…) |
| Ctrl + Shift + F12 | Maximize the editor |
| Esc | Focus 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.
0 Comments