Sublime Forum

Alt+<KEY> bindings and Linux

#1

Hi,

I see that some plugins (e.g. SublimeClang) use Alt+… bindings, e.g. Alt+d or Alt+p. The problem that in Unity (and I almost sure in GNOME) the key is handled by window manager first. It means that if I press Alt+p in Sublime window then “Project” menu will be selected.

Is there any way to tell Unity that I do not want that Alt+ activated menu? Instead I want that Sublime processed this key. Are there any other alternatives? If the only way is remapping keys then what is the standard practice for Alt+ keys? e.g. what Alt+p should become in Linux?

0 Likes

#2

awesome.naquadah.org/

0 Likes

#3

Ok, I think I found that magical combination.

To disable menu mnemonics for Sublime on ubuntu 12.04 with Unity open $HOME/.gtkrc-2.0 , add “gtk-enable-mnemonics = 0” there and restart Sublime. After that ALT+F will not activate menu. I seems Sublime uses GTK2 (and the rest of Ubuntu uses GTK3).

I wonder if such option could be made application-specific (i.e. Sublime-specific). I see that GTK has such setting developer.gnome.org/gtk/2.24/Gtk … -mnemonics (and there is another interesting option ‘gtk-enable-accels’) I wonder if it possible to set it per-app (and make gtk-enable-mnemonics ‘false’ in Linux)? Sublime developers what do you think?

0 Likes

#4

Hi anatolik, did you make any further progress with this? I’m having the same issue and would be good to be able to disable the unity alt+ bindings for sublime text only.

0 Likes

#5

I had the same issue and i had to disable the alt key in ccsm:

“Ubuntu Unity Plugin”->“Key to show the menu bar while pressed”-> “Change to Disabled”

0 Likes