Intellij idea windows keymap

Keymap

You may have heard that IntelliJ IDEA is a keyboard-centric IDE. What this means is that you can work without ever touching the mouse, which helps you stay focused and, in the end, be more productive. This is why it’s very important to know the IntelliJ IDEA keymap — which keys and key combinations are mapped to which actions.

1. Settings

IntelliJ IDEA comes with a set of keymaps that have been specially adapted for use with different operating systems, and to ease the transition from other IDE and editors. For example, if you are a long time user of Eclipse or NetBeans, or an avid Emacs fan, you can find the keymap that is right for you. To select a keymap that you want to use, go to Settings → Keymap . Any keymap you choose can further be tailored to your specific habits, that is you can add your own key combinations and modify existing ones.

2. Find action by shortcut

If you are wondering what this or that key shortcut does, look it up as shown on the following picture.

The complete keymap reference is always available via Help → Default Keymap Reference , and on the IntelliJ IDEA website.

3. Call action by name

Whenever you need to perform some action, but don’t know what shortcut to use, press via Shift + Ctrl + A ( Shift + Cmd + A for Mac) directly from the editor, and start typing what you are looking for.

4. System shortcuts conflicts

Sometimes even if you’ve chosen a keymap that is specific for your operating system, there may still be conflicts between shortcuts used in IntelliJ IDEA and your OS. To avoid these conflicts, simply make the following tweaks in your system settings.

5. Mac OS X

Switch the F1 — F12 keys to the standard function keys behaviour, because they are all actively used them in IntelliJ IDEA.

Disable Show Spotlight search field , because its shortcut is Ctrl + Space , a default code completion shortcut in IntelliJ IDEA.

By default, the Mac OS X keymap is selected when you run IntelliJ IDEA for the first time on any Mac OS machine, but you can opt to the use of the Mac OS X 10.5+ keymap, which was specially designed for Mac OS X version 10.5 and later and is more friendly to users who are used to the Mac OS X system shortcuts.

6. Ubuntu

Here’s a list of tweaks you need to make with default system key bindings so that they won’t interfere with IntelliJ IDEA actions (listed in brackets).

Disable the Shade window action, assigned to Ctrl + Alt + S (Settings dialog)

Change or disable the Lock Screen action, assigned to Ctrl + Alt + L (Reformat code)

Change or disable the Launch terminal action, assigned to Ctrl + Alt + T (Surround with)

Change or disable the Switch to workspace action, assigned to Сtrl + Alt + Arrows (Navigation)

Disable the Move window action, assigned to Alt + F7 (Find usages)

Change or disable the Resize window action, assigned to Alt + F8 (Evaluate expression)

7. Vim

And finally if you are a dedicated Vim fan, and cannot go on coding in a different editor, then you will happy to know that IntelliJ IDEA has Vim emulation plugin. To enable the Vim keymap in IntelliJ IDEA you have to download and enable IdeaVim plugin in Settings → Plugins .

The plugin supports many Vim features including shortcuts, motion keys, many types of commands, registers, macros, modes and a lot more.

IntelliJ IDEA keyboard shortcuts

IntelliJ IDEA has keyboard shortcuts for most of its commands related to editing, navigation, refactoring, debugging, and other tasks. Memorizing these hotkeys can help you stay more productive by keeping your hands on the keyboard.

Читайте также:  Как разработать для mac os

If your keyboard does not have an English layout, IntelliJ IDEA may not detect all of the shortcuts correctly.

The following table lists some of the most useful shortcuts to learn:

Quickly find any file, action, symbol, tool window, or setting in IntelliJ IDEA, in your project, and in the current Git repository.

Find a command and execute it, open a tool window, or search for a setting.

Quick-fixes for highlighted errors and warnings, intention actions for improving and optimizing your code.

Jump to the next or previous highlighted error.

Select a recently opened file from the list.

Insert any necessary trailing symbols and put the caret where you can start typing the next statement.

Reformat the whole file or the selected fragment according to the current code style settings.

Refactor the element under the caret, for example, safe delete, copy, move, rename, and so on.

Increase or decrease the scope of selection according to specific code constructs.

Comment out a line or block of code.

Navigate to the initial declaration of the instantiated class, called method, or field.

Show all places where a code element is used across your project.

Shortcut Action
Double Shift
Alt+1 Focus the Project tool window
Escape Focus the editor

If you are using one of the predefined keymaps for your OS, you can print the default keymap reference card and keep it on your desk to consult it if necessary. This cheat sheet is also available under Help | Keymap Reference .

Choose the right keymap

To view the keymap configuration, open the Settings/Preferences dialog Ctrl+Alt+S and select Keymap .

Enable function keys and check for possible conflicts with global OS shortcuts.

Use a predefined keymap

IntelliJ IDEA automatically suggests a predefined keymap based on your environment. Make sure that it matches the OS you are using or select the one that matches shortcuts from another IDE or editor you are used to (for example, Eclipse or NetBeans ).

Tune your keymap

You can modify a copy of any predefined keymap to assign your own shortcuts for commands that you use frequently.

Import custom keymap

If you have a customized keymap that you are used to, you can transfer it to your installation.

Besides the default set of keymaps, you can add more as plugins (such as, keymaps for GNOME and KDE): open the Settings/Preferences dialog Ctrl+Alt+S , select Plugins and search for keymap in the Marketplace.

If your keymap stopped working after an update, it is likely that the keymap is not available by default in the new version of IntelliJ IDEA. Find this keymap as a plugin and install it on the Plugins page as described in Manage plugins.

Learn shortcuts as you work

IntelliJ IDEA provides several possibilities to learn shortcuts:

Find Action is the most important command that enables you to search for commands and settings across all menus and tools.

Press Ctrl+Shift+A and start typing to get a list of suggested actions. Then select the necessary action and press Enter to execute it.

Key Promoter X is a plugin that shows a popup notification with the corresponding keyboard shortcut whenever a command is executed using the mouse. It also suggests creating a shortcut for commands that are executed frequently.

If you are using one of the predefined keymaps for your OS, you can print the default keymap reference card and keep it on your desk to consult it if necessary. This cheat sheet is also available under Help | Keymap Reference .

To print a non-default or customized keymap, use the Keymap exporter plugin.

If an action has a keyboard shortcut associated with it, the shortcut is displayed near the name of the action. To add a shortcut for an action that you use frequently (or if you want to change an existing shortcut), select it and press Alt+Enter .

Use advanced features

You can further improve your productivity with the following useful features:

If there is a group of actions that you often use, create a quick list to access them using a custom shortcut. For example, you can try using the following predefined quick lists:

Refactor this Ctrl+Alt+Shift+T

VCS Operations Alt+`

IntelliJ IDEA provides a lot of typing assistance features , such as automatically adding paired tags and quotes, and detecting CamelHump words.

When the focus is on a tool window with a tree, list, or table, start typing to see matching items.

Many actions in IntelliJ IDEA provide more results when you execute them multiple times. For example, when you invoke basic code completion with Ctrl+Space on a part of a field, parameter, or variable declaration, it suggests names depending on the item type within the current scope. If you invoke it again, it will include classes available through module dependencies. When invoked for the third time in a row, the list of suggestions will include the whole project.

Resize tool windows

You can adjust the size of tool windows without a mouse:

To resize a vertical tool window, use Ctrl+Shift+Left and Ctrl+Shift+Right

To resize a horizontal tool window, use Ctrl+Shift+Up and Ctrl+Shift+Down

Keymap

Use this page to search for shortcuts and actions in the selected keymap, create, edit, and remove custom keymaps, and change shortcuts associated with actions in custom keymaps. Predefined keymaps are not editable. When you change shortcut associations for a predefined keymap (listed in bold), IntelliJ IDEA creates a copy of that keymap, which you can modify (listed in regular font with an indent below the parent keymap).

Keymap scheme actions

Click to select an action for the selected keymap:

Item Description
Duplicate Create a child keymap based on the selected one. It is created automatically when you modify a predefined keymap.
Rename Change the name of a custom keymap.
Restore Defaults Abandon all the changes made to a custom keymap and restore the configuration of the parent keymap.
Delete Remove the selected custom keymap from the list.

Keymap toolbar

Ctrl+NumPad +

Ctrl+NumPad —

Change shortcuts for the selected action. It is possible to add new shortcuts and remove existing ones. Alternatively, you can right-click the necessary action.

Add Keyboard Shortcut : open the Keyboard Shortcut dialog where you can specify the key combination to assign to the selected action in the current keymap.

If you want to use Enter , Escape , or Tab , click and select the necessary key or combination. Pressing them in the Keyboard Shortcut dialog will result in the actual action, such as closing the dialog.

Add Mouse Shortcut : open the Mouse Shortcut dialog where you can specify the combination of mouse clicks to assign to the selected action in the current keymap.

Remove : delete the shortcut from the selected action.

Search through the content pane of actions. As you type a search string, the actions that match the search pattern are displayed.

The previously used search patterns are stored in the search history list. To add the search string to the history list, press Enter .

Click to reveal the history list of the previous searches.

Click to clear the current search pattern from the field.

Click this button to open the Find Shortcut dialog to filter out the desired actions by keystrokes.

Refer to the section Configure keyboard shortcuts to learn how to specify keyboard shortcuts.

The actions with shortcuts that match the specified criteria are shown in the content pane of actions.

Configure keyboard shortcuts

IntelliJ IDEA includes several predefined keymaps and lets you customize frequently used shortcuts.

To view the keymap configuration, open the Settings/Preferences dialog Ctrl+Alt+S and select Keymap .

IntelliJ IDEA automatically suggests a predefined keymap based on your environment. Make sure that it matches the OS you are using or select the one that matches shortcuts from another IDE or editor you are used to (for example, Eclipse or NetBeans ).

You cannot change predefined keymaps. When you modify any shortcut, IntelliJ IDEA creates a copy of the currently selected keymap, which you can configure. Click to duplicate the selected keymap, rename, remove, or restore it to default values.

A custom keymap is not a full copy of its parent keymap. It inherits unmodified shortcuts from the parent keymap and defines only those that were changed. For information about the keymap files, see Location of user-defined keymaps.

The keymap itself is a list of actions with corresponding keyboard and mouse shortcuts, and abbreviations. To find an action by name, type it in the search field. If you know the shortcut of an action, click and press the key combination in the Find Shortcut dialog.

Add a keyboard shortcut

On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Add Keyboard Shortcut .

In the Keyboard Shortcut dialog, press the necessary key combination.

If you want to use Enter , Escape , or Tab , click and select the necessary key or combination. Pressing them in the Keyboard Shortcut dialog will result in the actual action, such as closing the dialog.

If necessary, select the Second stroke checkbox to define a complex shortcut with two sequential key combinations.

Click OK to save the shortcut.

The key combination that you press is displayed in the Keyboard Shortcut dialog, as well as a warning if it conflicts with existing shortcuts.

Add a mouse shortcut

On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Add Mouse Shortcut .

In the Mouse Shortcut dialog, move the mouse pointer to the central area and click or scroll as necessary.

Click OK to save the shortcut.

The performed mouse manipulations are displayed in the Mouse Shortcut dialog, as well as a warning if it conflicts with existing shortcuts.

Add an abbreviation

An abbreviation can be used to quickly find an action without a shortcut. For example, you can press Ctrl+Shift+A and type the name of the Jump to Colors and Fonts action to quickly modify the color and font settings of the element under the current caret position. If you assign an abbreviation for this action (like JCF ), you can then type it instead of the full action name.

On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Add Abbreviation .

In the Abbreviation dialog, type the desired abbreviation and click OK .

Reset action shortcuts to default

If you changed, added, or removed a shortcut for an action, you can reset it to the initial configuration.

On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Reset Shortcuts .

Location of user-defined keymaps

All user-defined keymaps are stored in separate configuration files under the keymaps subdirectory in the IntelliJ IDEA configuration directory:

\keymaps Example C:\Users\JohnS\AppData\Roaming\JetBrains\IntelliJIdea2021.1\keymaps

Each keymap file contains only the differences relative to the parent keymap.

You can use these files to share your custom keymaps with team members or between your IDE instances. Copy the corresponding keymap file and put it in the keymaps directory on another IntelliJ IDEA installation.

Conflicts with global OS shortcuts

Predefined keymaps do not cover every possible platform, version, and configuration. Some shortcuts can conflict with global system actions and shortcuts for third-party software. To fix these conflicts, you can reassign or disable the conflicting shortcut.

IntelliJ IDEA detects conflicts with system shortcuts and notifies you with a popup message:

Click Modify shortcuts to open the Keymap settings dialog where you can make the necessary adjustments:

Here are a few examples of possible system shortcut conflicts with the default keymap in IntelliJ IDEA. Make sure that function keys are enabled on your system.

Читайте также:  Для переустановки windows какие кнопки нажимать
Оцените статью
Item Tooltip and shortcut Description
Expand all nodes in the content pane of actions.
Collapse all nodes in the content pane of actions.
Show conflicts with system shortcuts List only those shortcuts that conflict with system hotkeys. Change them to avoid conflicts. Or you can change the corresponding system shortcuts (if possible).
Find Action by Shortcut