Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to bind an action to multiple shortcut keys in Intellij?

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?

like image 276
Garrett Hall Avatar asked Jan 15 '23 10:01

Garrett Hall


2 Answers

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.

Add shortcut

like image 118
CrazyCoder Avatar answered Jan 29 '23 07:01

CrazyCoder


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.

like image 44
jmcmann Avatar answered Jan 29 '23 07:01

jmcmann