Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Can anyone tell me how to enable Emacs keybind on Chrome?

I found some links but they are either not clearly mentioning how to do so or not what I want (I don't want external tools to be run for this purpose).

share|improve this question
Your first link indicates the way. I would guess type gconftool-2 --set /desktop/gnome/interface/gtk_key_theme Emacs or maybe gconftool-2 --type string --set /desktop/gnome/interface/gtk_key_theme Emacs. – Chan-Ho Suh Apr 24 '12 at 17:11
This does not seem to make any difference, I set the relevant configuration item and even restarted my whole system but Chrome does not recognise any Emacs keybindings for me... – John J. Camilleri Nov 30 '12 at 15:20

1 Answer

If you're using gtk3 the settings are in the libgtk-3-common package in /usr/share/themes/Emacs/gtk-3.0/gtk-keys.css and you can enable them with:

gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"

And to switch back:

gsettings set org.gnome.desktop.interface gtk-key-theme "Default"

If you're using gtk2 the settings are in the libgtk2.0-common package in /usr/share/themes/Emacs/gtk-2.0-key/gtkrc and you can enable them with:

gconftool-2 --type=string --set /desktop/gnome/interface/gtk_key_theme Emacs

And if you want to customize the keybindings you can copy the settings into ~/.themes/ with cp -r /usr/share/themes/Emacs /tmp/.themes/

ps. so does this mean you've managed to win the battle against Unity to steal all your modify keys back for Emacs to use?! :)

share|improve this answer
Thx for the answer and i'm sorry to be responding late. Right now I have no need to achieve what I described so I can't test. But seems to be feasible solution so +1 – IsaacS Jan 3 at 22:46
I managed to turn off key stealing from unity. Basically, in the Keyboard section of System Settings you go to the Shortcuts tab, Window section. Disable "Activate the window menu". In the Launchers section, Key to show the HUD, you should set it to RIGHT ALT (or something else). Problems gone! :) – Syzygy Mar 8 at 22:20
Thank you so much :) Kept doing the gtk2 conf, and it wasn't working... – Jérémie Apr 14 at 16:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.