Managing keyboard shortcut conflicts between IDE and OS (Ubuntu)

Solution 1:

I use Ubuntu as well and I disabled the native (Ubuntu) command Ctrl + Alt + L because I prefer IntelliJ's format code than this native Ubuntu command. However, in the 2nd case I prefered Ubuntu's shortcut so I didn't change anything.

So basically, you can choose which option you need more and then act accordingly.

Of course, until IDEA becomes Ubuntu friendly.

In the end, Ubuntu will always prefer its shortcuts and so far I haven't found any tool that can disable native shortcuts on request.

Solution 2:

I changed ubuntu shortcuts to

  • ctrl+win+L
  • ctrl+win+Left

similar to original. Works fine for me.

Solution 3:

In Ubuntu, the way to disable the ctrl+alt+left keybinding is to open System Settings -> Keyboard -> Shorcuts(tab) -> Navigation . Scroll to "Switch to workspace left", click on it and hit Backspace. It is silly that this is even enabled for stock Ubuntu 14.04 where there is only one desktop by default.

Solution 4:

There is a feature request to provide Ubuntu friendly keymap.

What to remap, IDEA or Linux keys? Decide yourself depending on what you are using more often. I guess you reformat code more often than lock screen? So remap Linux and leave IDEA default keyboard shortcut.

Solution 5:

You can just use the super (aka Windows Key) in combination with your intellijidea shortcut, in order to leave the default shortcuts for Ubuntu.

So, you can just

Ctrl + Alt + WinKey + L to format the code and

Ctrl + Alt + WinKey + Left for navigating backward

Hope this helps