I love using Ubuntu + i3wm, but one annoyance has been the lack of Emacs keybindings in various apps. For example, using Ctrl-a in the browser address bar should jump to the start of the line. Also, having to use the arrow keys instead of Ctrl-n and Ctrl-p when composing emails has been a pain.

Finally I seem to have found a solution, via Reddit, on the Arch Wiki.

Create file ~/.gtkrc-2.0 with contents:

gtk-key-theme-name = "Emacs"

Create file ~/.config/gtk-3.0/settings.ini with contents:

[Settings]
gtk-key-theme-name = Emacs

Run this command:

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

In case it’s not clear, I don’t really know how this stuff works. That’s OK. It’s done now and I will remember in the future that I wrote about it here.