Skip to content

Instantly share code, notes, and snippets.

@tpope
Last active May 9, 2022 23:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tpope/179e711026307aa6f7e34c82a7c14398 to your computer and use it in GitHub Desktop.
Save tpope/179e711026307aa6f7e34c82a7c14398 to your computer and use it in GitHub Desktop.
Alt-X/C/V as cut/copy/paste in GTK apps
/* ~/.config/gtk-3.0/gtk.css */
@import url("file:///usr/share/themes/Emacs/gtk-3.0/gtk-keys.css");
@binding-set gtk-alt-clipboard {
bind "<alt>x" { "cut-clipboard" () };
bind "<alt>c" { "copy-clipboard" () };
bind "<alt>v" { "paste-clipboard" () };
}
entry {
-gtk-key-bindings: gtk-emacs-text-entry, gtk-alt-clipboard;
}
textview {
-gtk-key-bindings: gtk-emacs-text-entry, gtk-emacs-text-view, gtk-alt-clipboard;
}
treeview {
-gtk-key-bindings: gtk-emacs-tree-view;
}
GtkMenuShell {
-gtk-key-bindings: gtk-emacs-menu;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment