[gtk/gtk-3-24] [Mac Keys] Restore command-key bindings.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24] [Mac Keys] Restore command-key bindings.
- Date: Tue, 13 Oct 2020 21:36:56 +0000 (UTC)
commit b46f50079bd80eb6f572a6524ee6b9040ecab7ff
Author: John Ralls <jralls ceridwen us>
Date: Mon Oct 12 13:36:43 2020 -0700
[Mac Keys] Restore command-key bindings.
Lost in transition from gtkrc to css.
gtk/gtk-keys.css.mac | 31 ++++++++++++++++++++++++++++---
1 file 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 {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]