PyCharm is a powerful integrated development environment (IDE) designed for Python programming. To improve productivity and efficiency, mastering PyCharm's shortcut keys is essential.
PyCharm Windows Shortcut Keys
NAVIGATE IN CONTEXT
Shortcut
Description
Alt + Shift + F
Add to favorites
Alt + up / Alt + down
Go to previous/next method
Ctrl + F11
Toggle bookmark with mnemonic
Ctrl + Shift + Back
Last edit location
F11
Toggle bookmark
Shift + F11
Show bookmarks
Ctrl + Alt + left / Ctrl + Alt + right
Navigate back/forward
Ctrl + G
Go to line/column…
Ctrl + ] / Ctrl + [
Go to code block end/start
Ctrl + [0-9]
Go to numbered bookmark
Ctrl + E / Ctrl + Shift + E
Recently viewed/Recent locations
Alt + F1
Select in…
REFACTOR AND CLEAN UP
Shortcut
Description
Shift + F6
Rename…
Ctrl + F6
Change signature…
Ctrl + Alt + Shift + T
Refactor this…
Ctrl + Alt + F / Ctrl + Alt + C
Introduce field/constant
F5 + F6
Copy…/Move…
Ctrl + Alt + N
Inline…
Ctrl + Alt + M
Extract method
Ctrl + Alt + V / Ctrl + Alt + P
Introduce variable/parameter
Ctrl + Alt + L
Reformat code
Alt + Delete
Safe delete…
CREATE AND EDIT
Shortcut
Description
Ctrl + Shift + J / Ctrl + enter
Join/split line
Ctrl + Alt + T
Surround with…
Ctrl + Shift + up / Ctrl + Shift + down
Move line up/down
Alt + Insert
Generate code
Ctrl + X / Ctrl + C / Ctrl + V
Cut/Сopy/Paste
Ctrl + W / Ctrl + Shift + W
Extend/shrink selection
Ctrl + S
Save all
Ctrl + /
Comment with line comment
Ctrl + Shift + C
Copy document path
Ctrl + Shift + I
Quick definition
Ctrl + Alt + O
Optimize imports
Ctrl + space
Basic code completion
Ctrl + Shift + space
Smart code completion
Ctrl + Shift + U
Toggle case
Ctrl + Q + Shift + F1
Quick/external documentation
Shift + enter
Start new line
Ctrl + Shift + enter
Complete statement
Ctrl + O + Ctrl + I
Override/implement members
Ctrl + NumPad+ / Ctrl + Shift + NumPad+
Expand/collapse code block
Ctrl + D
Duplicate current line or selection
Alt + enter
Show intention actions
Ctrl + Shift + V
Paste from clipboard history
Ctrl + P + Alt + Q
Parameter information/context info
Ctrl + Alt + space
Type name completion
Ctrl + Alt + I
Auto-indent lines
Ctrl + Y
Delete line at caret
NAVIGATE FROM SYMBOLS
Shortcut
Description
Ctrl + Alt + B
Implementation(s)
Ctrl + F12
Go to file member
Ctrl + Shift + B
Type declaration (JavaScript only)
Ctrl + Shift + F7
Highlight usages in file
Alt + F7 / Ctrl + F7
Find usages/Find usages in file
Ctrl + B
Declaration
Ctrl + U
Super method
Ctrl + Alt + Shift + N
Go to symbol
Ctrl + N + Ctrl + Shift + N
Go to class/file
Ctrl + Alt + F7
Show usages
BUILD, RUN, AND DEBUG
Shortcut
Description
Ctrl + Alt + Shift + F8
Toggle temporary line breakpoint
Ctrl + Shift + F8
Edit/view breakpoint
F9
Resume program
Ctrl + Shift + F10
Run context configuration
Shift + F7
Smart step into
F8 + F7
Step over/into
Shift + F8
Step out
Ctrl + F8
Toggle line breakpoint
Alt + F9 / Ctrl + Alt + F9
Run to cursor/Force run to cursor
Alt + F10
Show execution point
Ctrl + Shift + F2
Stop background processes…
Alt + F8
Evaluate expression…
Shift + F10 / F9
Run/debug current configuration
Ctrl + F2
Stop
Alt + Shift + F10 / F9
Run/debug selected configuration
VERSION CONTROL
Shortcut
Description
Ctrl + K
Commit
Ctrl + Alt + Z
Revert
Ctrl + T
Update project
Ctrl + Shift + K
Push…
Alt + Shift + C
Recent changes
Alt + Backquote
VCS operations popup…
Ctrl + Alt + Shift + down / Ctrl + Alt + Shift + up
Next/previous change
MASTER YOUR IDE
Shortcut
Description
Alt + [0-9]
Open a tool window
Ctrl + Alt + Y
Synchronize
Ctrl + Alt + S
Settings…
Ctrl + Backquote
Quick switch scheme…
Ctrl + Shift + A
Find action…
FIND EVERYTHING
Shortcut
Description
F3 + Shift + F3
Next/previous occurence
Ctrl + F3
Find word at caret
Ctrl + Shift + F / Ctrl + Shift + R
Find in path/Replace in path
Ctrl + F / Ctrl + R
Find/replace
Double + Shift
Search everywhere
ANALYZE AND EXPLORE
Shortcut
Description
Ctrl + F1
Show error description
Ctrl + Alt + Shift + I
Run inspection by name…
Ctrl + H / Ctrl + Alt + H
Type/call hierarchy
F2 + Shift + F2
Next/previous highlighted error
PyCharm macOS Shortcut Keys
MASTER YOUR IDE
Shortcut
Description
⌫
Go to editor (from a tool window)
⇧ + Back / ⇧ + ⌘ + F12
Hide active/all tool windows
⌥ + ⌘ + Y
Synchronize
⌘ + ,
Preferences…
⌃ + ⌘ + F
Toggle full screen mode
⌃ + Tab
Go to next/previous editor tab
⌃ + Backquote
Quick switch scheme…
F12
Jump to last tool window
⌘ + ↓ + ⌘ + ↑
Jump to source/navigation bar
⌘ + Y + 0-9
Open a tool window
⇧ + ⌘ + A
Find action…
VERSION CONTROL
Shortcut
Description
⌃ + ⌥ + ⇧ + ↓ / ⌃ + ⌥ + ⇧ + ↑
Next/previous change
⌥ + ⌘ + Z
Revert
⌘ + K
Commit
⇧ + ⌘ + K
Push…
⌥ + ⇧ + C
Recent changes
⌘ + T
Update project
⌃ + V
VCS operations popup…
NAVIGATE IN CONTEXT
Shortcut
Description
⌥ + ⇧ + F
Add to favorites
⌥ + F3
Toggle bookmark with mnemonic
⇧ + ⌘ + ⌫
Last edit location
⌘ + F3
Show bookmarks
⌥ + ⌘ + ] / ⌥ + ⌘ + [
Go to code block end/start
⌃ + [0-9]
Go to numbered bookmark
F3
Toggle bookmark
⌘ + E + ⇧ / ⌘ + E
Recently viewed/
⌘ + L
Go to line/column…
⌥ + F1
Select in…
⌘ + [ / ⌘ + ]
Navigate back/forward
⌃ + ↑ + ⌃ + ↓
Go to previous/next method
REFACTOR AND CLEAN UP
Shortcut
Description
F5 + F6
Copy…/Move…
⌥ + ⌘ + M
Extract method
⌥ + ⌘ + N
Inline…
⌃ + T
Refactor this…
⌥ + ⌘ + L
Reformat code
⌥ + ⌘ + C / ⌥ + ⌘ + P
Introduce constant/parameter
⇧ + F6
Rename…
⌥ + ⌘ + V / ⌥ + ⌘ + F
Introduce variable/field
⌘ + F6
Change signature…
⌘ + ⌫
Safe delete…
BUILD, RUN, AND DEBUG
Shortcut
Description
⇧ + F8
Step out
⌥ + F10
Show execution point
⌘ + F8
Toggle line breakpoint
⇧ + F7
Smart step into
⇧ + ⌘ + F2
Stop background processes…
⌃ + ⌥ + R / ⌃ + ⌥ + D
Run/debug selected configuration
⌃ + ⌥ + R
Run context configuration
F8 + F7
Step over/into
⌃ + R / ⌃ + D
Run/debug current configuration
⌥ + ⇧ + ⌘ + F8
Toggle temporary line breakpoint
⌥ + F8
Evaluate expression…
⇧ + ⌘ + F8
Edit/view breakpoint
⌥ + ⌘ + R
Resume program
⌥ + ⌘ + F9
Force run to cursor
⌥ + F9
Run to cursor
⌘ + F2
Stop
NAVIGATE FROM SYMBOLS
Shortcut
Description
⌥ + F7 + ⌘ + F7
Find usages/Find usages in file
⌘ + B
Declaration
⌥ + ⌘ + F7
Show usages
⇧ + ⌘ + F7
Highlight usages in file
⌃ + ⇧ + B
Type declaration (JavaScript only)
⌥ + ⌘ + B
Implementation(s)
⌘ + U
Super method
CREATE AND EDIT
Shortcut
Description
⌥ + ␣
Quick definition
⇧ + ⌘ + C
Copy document path
⌘ + N
Generate code
⌥ + ⌘ + T
Surround with…
⇧ + ⌘ + A
Find any action inside the IDE
⌃ + ⇧ + Q
Context info
⌃ + O + ⌃ + I
Override/implement members
⌘ + S
Save all
⇧ + ⌘ + + / ⇧ + ⌘ + -
Expand/collapse all
⌘ + + + ⌘ + -
Expand/collapse code block
⇧ + ⌘ + U
Toggle case
⇧ + ⌘ + ↑ / ⇧ + ⌘ + ↓
Move line up/down
⌥ + ↑ + ⌥ + ↓
Extend/shrink selection
⇧ + ⏎
Start new line
⇧ + ⌘ + ⏎
Complete statement
⌃ + ⇧ + J + ⌘ + ⏎
Join/split line
F1 + ⇧ + F1
Quick/external documentation
⇧ + ⌘ + V
Paste from clipboard history
⌘ + D
Duplicate current line or selection
⌘ + X / ⌘ + C / ⌘ + V
Cut/Copy/Paste
⌘ + ⌫
Delete line at caret
⌘ + P
Parameter information
⌃ + ⌥ + I
Auto-indent lines
⌘ + /
Comment with line comment
⌥ + ⏎
Show intention actions
⌃ + ⌥ + ␣
Type name completion
⌃ + ⌥ + O
Optimize imports
⌃ + ␣ / ⌃ + ⇧ + ␣
Basic/smart code completion
ANALYZE AND EXPLORE
Shortcut
Description
⌥ + ⇧ + ⌘ + I
Run inspection by name…
F2 + ⇧ + F2
Next/previous highlighted error
⌃ + H / ⌃ + ⌥ + H
Type/call hierarchy
⌘ + F1
Show error description
FIND EVERYTHING
Shortcut
Description
Double + ⇧
Search everywhere
⌘ + G + ⇧ / ⌘ + G
Next/previous occurence
⇧ + ⌘ + O / ⌥ + ⌘ + O
Go to file/symbol
⇧ + ⌘ + F / ⇧ + ⌘ + R
Find in path/Replace in path
⌘ + F / ⌘ + R
Find/Replace
⌘ + F12
Go to file member
⌘ + O
Go to class
About PyCharm
PyCharm, developed by JetBrains, is a leading Python IDE equipped with tools for professional development. It supports various Python frameworks and has advanced features like intelligent code assistance, debugging, and testing.
What is the shortcut for reformatting code?
Windows: Ctrl + Alt + L macOS: Cmd + Alt + L
How can I quickly navigate to a file?
Windows: Ctrl + Shift + N macOS: Cmd + Shift + O
What is the shortcut for debugging?
Windows: Shift + F9 macOS: Ctrl + D
How do I view recent files?
Windows: Ctrl + E macOS: Cmd + E
What is the shortcut to duplicate a line?
Windows: Ctrl + D macOS: Cmd + D
How do I run a program?
Windows: Shift + F10 macOS: Ctrl + R
What is the shortcut to step into a function during debugging?
Windows: F7 macOS: Cmd + Alt + I
How can I navigate backward?
Windows: Ctrl + Alt + Left macOS: Cmd + [
What is the shortcut for smart code completion?
Windows: Ctrl + Shift + Space macOS: Cmd + Shift + Space
Conclusion
Mastering PyCharm's shortcut keys can significantly enhance your productivity as a Python developer. With this comprehensive guide, you now have all the essential shortcuts at your fingertips. Explore and practice these shortcuts to streamline your workflow in PyCharm!
Discussion
New Comments
No comments yet. Be the first one!