How to bind an action to multiple shortcut keys in Intellij? - intellij-idea

I want to bind some of IntelliJ IDEA shortcut keys, but at the same time keep the default bindings in place in case anyone wants to use my IDE (e.g. pair programming).
Is there a way to assign multiple shortcuts to one action in IntelliJ IDEA? Or is there a plugin that does this?

It's supported out of the box, just add new keyboard shortcuts to the action, old shortcuts will be kept. Note that you can't add a shortcut that conflicts with some other action.

In Settings -> Keymap, there isn't anything preventing multiple shortcuts from being assigned to the same action. Select "Add Keyboard Shortcut" and assign your shortcut. After it is saved, select "Add Keyboard Shortcut" again with your next shortcut. Both should now work.
This was testing with Intellij IDEA 9.0.

Related

Intellij plugin keymap first-stroke value

I have implemented a plugin that I would now like to use. However, I do not understand and did not see clear documentation on how to assign keyboard shortcuts. I would like to activate it on a alt + enter key combination, but its not obvious what my keyboard-shortcut entry should be.
<keyboard-shortcut keymap="Mac OS X" first-keystroke="???"/>
I have the "Mac OS X" keymap set in preferences.
The shortcut for Alt-Enter is written as "alt ENTER". You can look at the default keymaps as an example for defining other keyboard shortcuts.
Note that Alt-Enter is already used by the quickfix menu in IntelliJ IDEA, so it may not be a good idea to use the same shortcut for your own action. If you want to extend the Alt-Enter menu, there are other mechanisms for that (intention actions).

Alt key command in Intellij for Windows

I've mapped some functions in IntelliJ IDEA to the Alt key.
Specifically Alt+W for closing an active tab.
When I mapped the key, it said that there were no conflicts with existing key binds, but whenever I try Alt+W to close an active tab, the "Window" navigation-tab in the editor is selected instead.
(see picture)
I'm thinking that this is a standard Windows functionality for the navigation tabs in applications which is overriding the Intellij Keymap, but I don't know how to disable this. Any ideas?

How do I change Alt+Enter keyboard shortcut in IntelliJ/Android Studio?

Is it possible to change Alt+Enter (Show the list of available intention actions) keyboard shortcut in IntelliJ/Android Studio?
I have browsed through File->Settings->Keymap and couldn't find it, though I remember that I was changing it before.
You find it in the Keymap settings under
Other->Show Intention Actions

Change intellij/android studio tool window quick access shortcuts

Is it possible to change the quick access shortcut numbers for a tool window?
i.e. the numbers next to a tool window name, used by the keyboard shortcut to toggle the window, talked about here
Yep. They are listed in Keymap. MainMenu -> View -> ToolWindows.
P.S.: Idea has a nice Find by shortcut function in Keymap settings page, I used it, to answer your question.
In Android Studio, you can change the Keymap this way:
Preferences -> Keymap
Then open Tool Windows. You may need to scroll down to see all the options.
Right-click on the element you want to assign a new key-stroke. Select Add Keyboard Shortcut. Make sure that the rectangle with a plus in it is selected (use your mouse) and press the key-stroke that you want for this item.
Android Studio will warn you if that key-stroke is already assigned. Click OK to reassign that key-stroke to the item. It'll warn you one more time that you will need to remove the previous assignment for that key-stroke. Click Remove to proceed. You should see the updated keystroke in the right-most column.

How to disable help in IntelliJ Idea?

I have mapped 'tilde' key (under escape on mac) to autocomplete, I just find it easier that way. At times I instead hit F1 accidentally and the IntellJ help pops up. Is there a way that I can disable F1 from activating help?
Yes. Press Ctrl+Alt+S and go to the Keymap tab in settings. Then find the "Context Help" node in All Actions/Other/Context help, and remove the shortcut.
You can look for other bound shortcuts in the future (by the key used to activate them) using the "filter" icon to the right of the search box.