Ubuntu 18.04 shortcuts with IntelliJ

The default Gnome system shortcuts on Ubuntu 18.04 conflict with IntelliJ default keybindings. There are several solutions to fix this. One solution offered is to change the IntelliJ shortcut profile to avoid collisions with default system Ubuntu definitions. This is less than ideal because first they don’t fully avoid collisions, and second you have to learn new keybindings.

It’s also worth stating that I don’t know of an elegant solution to having both work – so assuming you are like me and prefer to have IntelliJ be the consumer of things like Alt+F7 and Ctrl+Alt+Left and Ctrl+Alt+Right and so on, you will need to do the following.

List all your system shortcuts

$ gsettings list-recursively org.gnome.desktop.wm.keybindings

Find the ones you want to change and get them, change them and get them again (to read, write, verify) each one.

Here is an example for Ctrl+Alt+Right

$ gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-right

$ gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right “[”]”

$ gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-right

You can figure out the rest from there. My understanding is that there isn’t a good graphical tool that will allow full control (e.g. Settings->Keyboard->etc) doesn’t show all system shortcuts.

Leave a Reply

Your email address will not be published. Required fields are marked *