I recently got myself a new desktop computer with nice and fast hardware (more about this in another post) and am setting up Ubuntu Gnome on it. Since I’ll still be using my MacBook Pro for some time I don’t want to learn another set of keyboard shortcuts, so I set out to use IDEA’s OS X 10.5+ keyboard bindings on Ubuntu. It turns out that it possible, although not straightforward. Here’s how to go about it.

In IDEA, under Help > Edit custom properties add the following property:

keymap.windows.as.meta=true

Next, in the Tweak tool go to Typing > Alt/Win key behavior and select “Alt is swapped with Win”.

At this point, some shortcuts will work (such as Meta+, which opens the settings) but one in particular will not: Meta+o. As this is the shortcut for finding a class, it is quite an annoyance not to have it working. It also happens to be the hardest bit to get to work, since the binding is hidden deep down in the media key bindings. In order to get rid of it, run dconf-editor and then look for org.gnome.settings-daemon.plugins.media-keys. In the version that I am running, there is no key defined for the culprit (rotate-video-lock-key) - I’m thinking that it should be possible to create this key somehow, but as an easy workaround it is also possible to just deactivate the entire plugin by setting the active key to false.

I’m expecting there to be quite a bit more work to get the environment setup nicely and find alternatives to what there is on OS X, but at least the keyboard shortcuts for IDEA should work nicely now. I plan on writing more of those little posts as I make progress, you can follow the progress on this matter here.