PyCharm 4.0.0 Web Help

PyCharm as a keyboard-centric IDE suggests keyboard shortcuts for most of its commands. In this topic, you can find a short list of the most indispensable of them, to make your first steps with PyCharm easy.

Tip

PyCharm also provides the default keymap reference in pdf format. To view the keymap reference, choose Help | Default Keymap Reference on the main menu.

See the detailed list of default keyboard shortcuts in the Keyboard Shortcuts Reference and learn how to customize your preferred keymap in the Configuring Keyboard Shortcuts section.

Shortcut Description
Ctrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+ICtrl+Shift+AShift ⌘ AShift ⌘ A⌘ 3 Find action by name
Alt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+Enter, Shift+Alt+J or Ctrl+Shift+MAlt EnterAlt Enter⌘ 1 Show the list of available intention actions.
Alt+F1Shift+Alt+1 or Alt+F1Shift+Alt+1Alt+F1Alt+F1Alt+F1Ctrl+Shift+1, Ctrl+Shift+2, Ctrl+Shift+3 or Ctrl+Shift+9Alt+F1Alt F1Alt F1Alt ⌘ W Switch between views ( Project, Structure, etc.).
Ctrl+Tab or Ctrl+Shift+TabCtrl+Tab or Ctrl+Shift+TabCtrl+Tab or Ctrl+Shift+TabCtrl+Tab or Ctrl+Shift+TabCtrl+X, BCtrl+Tab or Ctrl+Shift+TabCtrl+Tab or Ctrl+Shift+TabCtrl+Tab or Ctrl+Shift+TabControl Tab or Control Shift TabControl Tab or Control Shift TabControl Tab or Control Shift Tab Switch between the tool windows and files opened in the editor.
Alt+HomeAlt+HomeAlt+HomeAlt+HomeAlt+HomeAlt+HomeAlt+HomeAlt+Home⌘ Up or Alt HomeAlt HomeAlt ⌘ B Show the Navigation bar.
Ctrl+JCtrl+JCtrl+JCtrl+JCtrl+JCtrl+JCtrl+JCtrl+Shift+Alt+J⌘ J⌘ J⌘ J Insert a live template.
Ctrl+Alt+JCtrl+Alt+JCtrl+Alt+JCtrl+Alt+JCtrl+Alt+JCtrl+Alt+JCtrl+Alt+JCtrl+Alt+JAlt ⌘ JAlt ⌘ JAlt ⌘ J Surround with a live template.
F4F4F4F4F4F4F4F12 or Ctrl+Shift+E⌘ Down or F4F4F3 Edit an item from the Project or another tree view.
Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Alt+SemicolonCtrl+Slash, Ctrl+NumPad / or Ctrl+ColonCtrl+Slash or Ctrl+Shift+CCtrl+Slash or Ctrl+NumPad /⌘ Slash or ⌘ NumPad /⌘ Slash or ⌘ NumPad /⌘ Slash or ⌘ NumPad /
Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash, Ctrl+Shift+NumPad / or Ctrl+Shift+ColonCtrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+SlashAlt ⌘ Slash, Alt ⌘ NumPad /, Control Shift Slash, Control Shift NumPad /, Shift ⌘ Slash or Shift ⌘ NumPad /Control Shift Slash, Control Shift NumPad /, Shift ⌘ Slash or Shift ⌘ NumPad /Control Shift Slash
Comment or uncomment a line or fragment of code with the line or block comment.
Ctrl+NCtrl+NCtrl+NCtrl+NShift+Alt+GCtrl+CommaCtrl+OCtrl+Shift+T⌘ O⌘ NShift ⌘ T
Ctrl+Shift+NCtrl+Shift+NCtrl+Shift+NCtrl+Shift+NCtrl+X, Ctrl+FCtrl+Shift+NShift+Alt+OCtrl+Shift+RShift ⌘ OShift ⌘ NShift ⌘ R
Find class or file by name.
Ctrl+DCtrl+DCtrl+DCtrl+D⌘+DCtrl+DCtrl+D, Ctrl+Shift+Down or Ctrl+Shift+UpCtrl+D⌘ D⌘ D⌘ D Duplicate the current line or selection.
Ctrl+WCtrl+WCtrl+WCtrl+WCtrl+Alt+WCtrl+WShift+Alt+PeriodShift+Alt+UpAlt Up⌘ WControl Shift Up and Ctrl+Shift+WCtrl+Shift+WCtrl+Shift+WCtrl+Shift+WCtrl+Shift+WCtrl+Shift+WShift+Alt+CommaShift+Alt+DownAlt DownShift ⌘ WControl Shift Down Incremental expression selection.
Ctrl+F or Alt+F3Ctrl+F or Shift+Alt+3Ctrl+F or Shift+Alt+3Ctrl+F or Alt+F3Ctrl+Alt+S, Alt+F3 or Ctrl+SCtrl+F or Alt+F3Ctrl+F or Alt+F3Ctrl+F or Alt+F3⌘ F⌘ F or Alt F3⌘ F Find text string in the current file.
Ctrl+Shift+FCtrl+Shift+FCtrl+Shift+FCtrl+Shift+FCtrl+Shift+FCtrl+Shift+FCtrl+Shift+FCtrl+HShift ⌘ FControl Shift FControl H Find text in the project or in the specified directory.
Double-press Shift Search everywhere.
Ctrl+Shift+F7Ctrl+Shift+F7Ctrl+Shift+7Ctrl+Shift+F7Ctrl+Shift+F7Ctrl+Shift+F7Ctrl+Shift+F7Shift+Alt+O or Ctrl+Shift+F7Shift ⌘ F7Shift ⌘ F7Shift ⌘ F7 Quick view the usages of the selected symbol.
Ctrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+Equals⌘ NumPad or ⌘ Equals⌘ NumPad or ⌘ Equals⌘ NumPad or ⌘ Equals
Ctrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+Minus⌘ NumPad - or ⌘ Minus⌘ NumPad - or ⌘ Minus⌘ NumPad - or ⌘ Minus
Expand or collapse a code block in the editor.
Ctrl+SpaceCtrl+SpaceCtrl+SpaceCtrl+SpaceAlt+SlashCtrl+SpaceCtrl+Space or Ctrl+Back SlashCtrl+SpaceControl SpaceControl SpaceControl Space Invoke code completion.

See Also

Procedures:

Reference:

Web Resources: