How to swap control/command key in Intellij or programmatically modify keymap?
Hello,
I was a Visual Studio user on Windows and recently switched to Intellij on mac. Here is my situation:
I have swapped command/control mapping on my mac system, so copy is ctrl+c, select all is ctrl+a everywhere etc.
I'd like to use the Visual Studio key map in Intellij. However Intellij smartly determined that Visual Studio key map should use ctrl for everything, so inside Intellij copy is configured to be control+c; however since I flipped control and command on system level, I now need to press command+c to perform copy inside Intellij..
Here is what I want to achieve:
Use Visual Studio keymap inside Intellij;
Keep ctrl as ctrl..Ideally I never have to touch cmd key again
I can think of 2 ways to do this:
1. swap ctrl/cmd modifier inside Intellij
2. Export the Visual Studio keymap file; programmatically change all ctrl to cmd; import back
Unfortunately I don't know how to do either of those.. Any suggestions welcome!
Please sign in to leave a comment.
See https://stackoverflow.com/a/42422764/104891 for the related question which explains how to do 2). Just get the full keymap file XML, replace the keys, put the new keymap in the IDE config directory while IDE is not running.
I've run into the same problem. It would be really handy if there were way automatically swap the keys so they play nicely with the Visual Studio key map.
Does anyone have a solution to this? It seems that the stack overflow post is no longer relevant in 2023 with Rider, or maybe I'm just doing it wrong.