@binding-set gtk-mac-alt-arrows { bind "Right" { "move-cursor" (words, 1, 0) }; bind "KP_Right" { "move-cursor" (words, 1, 0) }; bind "Left" { "move-cursor" (words, -1, 0) }; bind "KP_Left" { "move-cursor" (words, -1, 0) }; bind "Right" { "move-cursor" (words, 1, 1) }; bind "KP_Right" { "move-cursor" (words, 1, 1) }; bind "Left" { "move-cursor" (words, -1, 1) }; bind "KP_Left" { "move-cursor" (words, -1, 1) }; } @binding-set gtk-mac-alt-delete { bind "Delete" { "delete-from-cursor" (word-ends, 1) }; bind "KP_Delete" { "delete-from-cursor" (word-ends, 1) }; bind "BackSpace" { "delete-from-cursor" (word-ends, -1) }; } @binding-set gtk-mac-cmd-c { bind "x" { "cut-clipboard" () }; bind "c" { "copy-clipboard" () }; bind "v" { "paste-clipboard" () }; unbind "x"; unbind "c"; unbind "v"; } @binding-set gtk-mac-text-view { bind "a" { "select-all" (0) }; bind "a" { "select-all" (1) }; unbind "a"; unbind "a"; } @binding-set gtk-mac-label { bind "a" { "move-cursor" (paragraph-ends, -1, 0) "move-cursor" (paragraph-ends, 1, 1) }; bind "a" { "move-cursor" (paragraph-ends, 0, 0) }; bind "c" { "copy-clipboard" () }; unbind "a"; unbind "a"; unbind "c"; } @binding-set gtk-mac-entry { bind "a" { "move-cursor" (buffer-ends, -1, 0) "move-cursor" (buffer-ends, 1, 1) }; bind "a" { "move-cursor" (visual-positions, 0, 0) }; unbind "a"; unbind "a"; } @binding-set gtk-mac-file-chooser { bind "v" { "location-popup-on-paste" () }; unbind "v"; bind "G" { "location-popup" () }; bind "H" { "home-folder" () }; bind "Up" { "up-folder" () }; } @binding-set gtk-mac-tree-view { bind "a" { "select-all" () }; bind "a" { "unselect-all" () }; bind "f" { "start-interactive-search" () }; bind "F" { "start-interactive-search" () }; unbind "a"; unbind "a"; unbind "f"; unbind "F"; } @binding-set gtk-mac-icon-view { bind "a" { "select-all" () }; bind "a" { "unselect-all" () }; unbind "a"; unbind "a"; } @binding-set gtk-mac-alt-arrows { bind "Right" { "move-cursor" (words, 1, 0) }; bind "KP_Right" { "move-cursor" (words, 1, 0) }; bind "Left" { "move-cursor" (words, -1, 0) }; bind "KP_Left" { "move-cursor" (words, -1, 0) }; bind "Right" { "move-cursor" (words, 1, 1) }; bind "KP_Right" { "move-cursor" (words, 1, 1) }; bind "Left" { "move-cursor" (words, -1, 1) }; bind "KP_Left" { "move-cursor" (words, -1, 1) }; } @binding-set gtk-mac-alt-delete { bind "Delete" { "delete-from-cursor" (word-ends, 1) }; bind "KP_Delete" { "delete-from-cursor" (word-ends, 1) }; bind "BackSpace" { "delete-from-cursor" (word-ends, -1) }; } @binding-set gtk-mac-cmd-c { bind "x" { "cut-clipboard" () }; bind "c" { "copy-clipboard" () }; bind "v" { "paste-clipboard" () }; unbind "x"; unbind "c"; unbind "v"; } @binding-set gtk-mac-text-view { bind "a" { "select-all" (0) }; bind "a" { "select-all" (1) }; unbind "a"; unbind "a"; } @binding-set gtk-mac-label { bind "a" { "move-cursor" (paragraph-ends, -1, 0) "move-cursor" (paragraph-ends, 1, 1) }; bind "a" { "move-cursor" (paragraph-ends, 0, 0) }; bind "c" { "copy-clipboard" () }; unbind "a"; unbind "a"; unbind "c"; } @binding-set gtk-mac-entry { bind "a" { "move-cursor" (buffer-ends, -1, 0) "move-cursor" (buffer-ends, 1, 1) }; bind "a" { "move-cursor" (visual-positions, 0, 0) }; unbind "a"; unbind "a"; } @binding-set gtk-mac-file-chooser { bind "v" { "location-popup-on-paste" () }; unbind "v"; bind "G" { "location-popup" () }; bind "H" { "home-folder" () }; bind "Up" { "up-folder" () }; } @binding-set gtk-mac-tree-view { bind "a" { "select-all" () }; bind "a" { "unselect-all" () }; bind "f" { "start-interactive-search" () }; bind "F" { "start-interactive-search" () }; unbind "a"; unbind "a"; unbind "f"; unbind "F"; } @binding-set gtk-mac-icon-view { bind "a" { "select-all" () }; bind "a" { "unselect-all" () }; unbind "a"; unbind "a"; } GtkIconView { gtk-key-bindings: gtk-mac-icon-view; } GtkTextView { gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-alt-delete, gtk-mac-cmd-c, gtk-mac-text-view; } GtkEntry { gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-alt-delete, gtk-mac-cmd-c, gtk-mac-entry; } GtkLabel { gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-label; } GtkFileChooserDefault { gtk-key-bindings: gtk-mac-file-chooser; } GtkTreeView { gtk-key-bindings: gtk-mac-tree-view; }