Middle mouse click for navigation versus Ubuntu/X11

I am using IDEA on Ubuntu/Unity for the first time.
I already managed to disabled all conflicting keyboard shortcuts in Ubuntu.

However I am still looking for a way to enable middle mouse button for navigation in IDEA.
Currently in the editor the middle mouse button just Pastes any previously selected text.

So far I have only learned that this behaviour is deeply rooted in X11 and there seems to be no way to change it (except for disabling the middle mouse button altogether which is not what I want).

Any suggestions? Over the last decade of using IDEA this shortcut has become so deeply ingrained that I really don't want to give it up.

4 comments

Hi Stephen,

You should go to your keymap settings (ide settings | keymap) and do the following:

  1. Remove 'Button2' mouse shortcut from 'Paste from X clipboard' action;
  2. Add 'Button2' mouse shortcut for 'main menu | navigate | declaration' action;


Denis

2

Thanks a lot!

Stupid me. I fought so hard to remove shortcuts like Alt-F1 and Ctrl-Alt-L from Ubuntu that I didn't thought to look at IDEA keymap anymore.

Also I wouldn't have expected any difference in the IDEA keymap for windows and linux (but of course it makes sense).

0

Sorry for resurrecting an old thread, but I have an issue with CLion 2017.1 on Ubuntu 16.04 where removing the said shortcut doesn't work. Mouse middle button click still paste, and if you try to bind middle mouse button click to another action in the Keymap, the editor will warn you that the shortcut is already bound to Paste From X11 (hence the "ghost shortcut".

Not sure if it applies to any default mouse shortcut, but there are not many of these so this is the first time I have this issue. Do you want me to investigate further before I report a bug?

For now, it prevents me from navigating with middle-click instead of ctrl+left click. The bug appeared after I uninstalled and reinstalled Nvidia I think, but I guess it's just related to the version of CLion.

0

Please sign in to leave a comment.