summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ralls <jralls@ceridwen.us>2020-10-12 13:36:43 -0700
committerJohn Ralls <jralls@ceridwen.us>2020-10-13 14:36:13 -0700
commitb46f50079bd80eb6f572a6524ee6b9040ecab7ff (patch)
treefe9a263ebced7eae3cbcdbfd629f256f9e0356a7
parent715dc780fd574e78f53af2d05c2f58d73be6cd45 (diff)
downloadgtk+-b46f50079bd80eb6f572a6524ee6b9040ecab7ff.tar.gz
[Mac Keys] Restore command-key bindings.
Lost in transition from gtkrc to css.
-rw-r--r--gtk/gtk-keys.css.mac31
1 files changed, 28 insertions, 3 deletions
diff --git a/gtk/gtk-keys.css.mac b/gtk/gtk-keys.css.mac
index 49c1ad9b29..c3cef9dc03 100644
--- a/gtk/gtk-keys.css.mac
+++ b/gtk/gtk-keys.css.mac
@@ -59,6 +59,31 @@
unbind "<shift><ctrl>a";
}
+@binding-set gtk-mac-cmd-arrows
+{
+ bind "<meta>Left" { "move-cursor" (paragraph-ends, -1, 0) };
+ bind "<meta>KP_Left" { "move-cursor" (paragraph-ends, -1, 0) };
+ bind "<shift><meta>Left" { "move-cursor" (paragraph-ends, -1, 1) };
+ bind "<shift><meta>KP_Left" { "move-cursor" (paragraph-ends, -1, 1) };
+ bind "<meta>Right" { "move-cursor" (paragraph-ends, 1, 0) };
+ bind "<meta>KP_Right" { "move-cursor" (paragraph-ends, 1, 0) };
+ bind "<shift><meta>Right" { "move-cursor" (paragraph-ends, 1, 1) };
+ bind "<shift><meta>KP_Right" { "move-cursor" (paragraph-ends, 1, 1) };
+}
+
+@binding-set gtk-mac-emacs-like
+{
+ bind "<ctrl>a" { "move-cursor" (paragraph-ends, -1, 0) };
+ bind "<shift><ctrl>a" { "move-cursor" (paragraph-ends, -1, 1) };
+ bind "<ctrl>e" { "move-cursor" (paragraph-ends, 1, 0) };
+ bind "<shift><ctrl>e" { "move-cursor" (paragraph-ends, 1, 1) };
+
+ bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) };
+ bind "<shift><ctrl>b" { "move-cursor" (logical-positions, -1, 1) };
+ bind "<ctrl>f" { "move-cursor" (logical-positions, 1, 0) };
+ bind "<shift><ctrl>f" { "move-cursor" (logical-positions, 1, 1) };
+}
+
@binding-set gtk-mac-file-chooser
{
bind "<meta>v" { "location-popup-on-paste" () };
@@ -94,15 +119,15 @@ iconview {
}
textview {
- -gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-alt-delete, gtk-mac-cmd-c, gtk-mac-text-view;
+ -gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-alt-delete, gtk-mac-cmd-c, gtk-mac-cmd-arrows, gtk-mac-emacs-like, gtk-mac-text-view;
}
entry {
- -gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-alt-delete, gtk-mac-cmd-c, gtk-mac-entry;
+ -gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-alt-delete, gtk-mac-cmd-c, gtk-mac-cmd-arrows, gtk-mac-emacs-like, gtk-mac-entry;
}
label {
- -gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-label;
+ -gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-cmd-arrows, gtk-mac-emacs-like, gtk-mac-label;
}
GtkFileChooserWidget {