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).
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).
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:And to switch back:
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:And if you want to customize the keybindings you can copy the settings into
~/.themes/
withcp -r /usr/share/themes/Emacs ~/.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?! :)
As of Chrome 59, which switched to gtk3, set
gtk-key-theme-name
toEmacs
in~/.config/gtk-3.0/settings.ini
:Cinnamon has its own settings:
Emacs keybindings for any gtk application except Google Chrome can be easily enabled, just follow the instruction you found.
Emacs keybinding for Google Chrome however was not working at the time of your question (Dec 2012). This is a bug from upstream https://code.google.com/p/chromium/issues/detail?id=11480. It is working now.
The bug has been solved in 2013. But the version of Chromium shipped with Ubuntu 14.04 still was bugged, you can do a security update which will include a version of chromium (v36) with this bug fixed (but as with any other software, total number of bug does not reduce, that is, new features introducing new bugs to replace fixed ones. For me life is harder since i upgrade, because ideographs stopped displaying in tab names).
It seems the other answer offered to you was not aware that your question is Chromium-specific and Emacs keybindings really did not work in Chromium for many years until 2014.
It didn't work for me until I turned on the "Emacs input" under "Keyboard and Mouse" in
gnome-tweaks
(command that brings up a settings GUI). I enabled and disabled the other options; onlygnome-tweaks
does it on my system.So far, I've seen four proposed solutions (not counting GTK-2 based solutions, since Chrome has been GTK-3 for a while):
gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"
[Settings] gtk-key-theme-name = Emacs
in ~/.config/gtk-3.0/settings.inignome-tweaks
All of these seem to be different systems wrestling control over the keybindings, and one of them (or one not listed above) will win. This isn't a good situation, but be aware that you might need to go through the list.
Also, I quit and restarted Chrome in each experiment (though I didn't reboot my computer or X session). I don't know that this is necessary—I don't know if Chrome detects the keybindings "live" or checks for it at startup—but it made for cleaner experiments.