]> Pileus Git - ~andy/gtk/blob - gtk/gtk-keys.css.mac
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtk-keys.css.mac
1 @binding-set gtk-mac-alt-arrows
2 {
3   bind "<alt>Right"           { "move-cursor" (words, 1, 0) };
4   bind "<alt>KP_Right"        { "move-cursor" (words, 1, 0) };
5   bind "<alt>Left"            { "move-cursor" (words, -1, 0) };
6   bind "<alt>KP_Left"         { "move-cursor" (words, -1, 0) };
7   bind "<shift><alt>Right"    { "move-cursor" (words, 1, 1) };
8   bind "<shift><alt>KP_Right" { "move-cursor" (words, 1, 1) };
9   bind "<shift><alt>Left"     { "move-cursor" (words, -1, 1) };
10   bind "<shift><alt>KP_Left"  { "move-cursor" (words, -1, 1) };
11 }
12
13 @binding-set gtk-mac-alt-delete
14 {
15   bind "<alt>Delete" { "delete-from-cursor" (word-ends, 1) };
16   bind "<alt>KP_Delete" { "delete-from-cursor" (word-ends, 1) };
17   bind "<alt>BackSpace" { "delete-from-cursor" (word-ends, -1) };
18 }
19
20 @binding-set gtk-mac-cmd-c
21 {
22   bind "<meta>x" { "cut-clipboard" () };
23   bind "<meta>c" { "copy-clipboard" () };
24   bind "<meta>v" { "paste-clipboard" () };
25   unbind "<ctrl>x";
26   unbind "<ctrl>c";
27   unbind "<ctrl>v";
28 }
29
30 @binding-set gtk-mac-text-view
31 {
32   bind "<shift><meta>a" { "select-all" (0) };
33   bind "<meta>a" { "select-all" (1) };
34   unbind "<shift><ctrl>a";
35   unbind "<ctrl>a";
36 }
37
38 @binding-set gtk-mac-label
39 {
40   bind "<meta>a" {
41     "move-cursor" (paragraph-ends, -1, 0)
42     "move-cursor" (paragraph-ends, 1, 1)
43   };
44   bind "<shift><meta>a" { "move-cursor" (paragraph-ends, 0, 0) };
45   bind "<meta>c" { "copy-clipboard" () };
46   unbind "<ctrl>a";
47   unbind "<shift><ctrl>a";
48   unbind "<ctrl>c";
49 }
50
51 @binding-set gtk-mac-entry
52 {
53   bind "<meta>a" {
54     "move-cursor" (buffer-ends, -1, 0)
55     "move-cursor" (buffer-ends, 1, 1)
56   };
57   bind "<shift><meta>a" { "move-cursor" (visual-positions, 0, 0) };
58   unbind "<ctrl>a";
59   unbind "<shift><ctrl>a";
60 }
61
62 @binding-set gtk-mac-file-chooser
63 {
64   bind "<meta>v" { "location-popup-on-paste" () };
65   unbind "<ctrl>v";
66
67   bind "<meta><shift>G" { "location-popup" () };
68   bind "<meta><shift>H" { "home-folder" () };
69   bind "<meta>Up" { "up-folder" () };
70 }
71
72 @binding-set gtk-mac-tree-view
73 {
74   bind "<meta>a" { "select-all" () };
75   bind "<shift><meta>a" { "unselect-all" () };
76   bind "<meta>f" { "start-interactive-search" () };
77   bind "<meta>F" { "start-interactive-search" () };
78   unbind "<ctrl>a";
79   unbind "<shift><ctrl>a";
80   unbind "<ctrl>f";
81   unbind "<ctrl>F";
82 }
83
84 @binding-set gtk-mac-icon-view
85 {
86   bind "<meta>a" { "select-all" () };
87   bind "<shift><meta>a" { "unselect-all" () };
88   unbind "<ctrl>a";
89   unbind "<shift><ctrl>a";
90 }
91
92 @binding-set gtk-mac-alt-arrows
93 {
94   bind "<alt>Right"           { "move-cursor" (words, 1, 0) };
95   bind "<alt>KP_Right"        { "move-cursor" (words, 1, 0) };
96   bind "<alt>Left"            { "move-cursor" (words, -1, 0) };
97   bind "<alt>KP_Left"         { "move-cursor" (words, -1, 0) };
98   bind "<shift><alt>Right"    { "move-cursor" (words, 1, 1) };
99   bind "<shift><alt>KP_Right" { "move-cursor" (words, 1, 1) };
100   bind "<shift><alt>Left"     { "move-cursor" (words, -1, 1) };
101   bind "<shift><alt>KP_Left"  { "move-cursor" (words, -1, 1) };
102 }
103
104 @binding-set gtk-mac-alt-delete
105 {
106   bind "<alt>Delete" { "delete-from-cursor" (word-ends, 1) };
107   bind "<alt>KP_Delete" { "delete-from-cursor" (word-ends, 1) };
108   bind "<alt>BackSpace" { "delete-from-cursor" (word-ends, -1) };
109 }
110
111 @binding-set gtk-mac-cmd-c
112 {
113   bind "<meta>x" { "cut-clipboard" () };
114   bind "<meta>c" { "copy-clipboard" () };
115   bind "<meta>v" { "paste-clipboard" () };
116   unbind "<ctrl>x";
117   unbind "<ctrl>c";
118   unbind "<ctrl>v";
119 }
120
121 @binding-set gtk-mac-text-view
122 {
123   bind "<shift><meta>a" { "select-all" (0) };
124   bind "<meta>a" { "select-all" (1) };
125   unbind "<shift><ctrl>a";
126   unbind "<ctrl>a";
127 }
128
129 @binding-set gtk-mac-label
130 {
131   bind "<meta>a" {
132     "move-cursor" (paragraph-ends, -1, 0)
133     "move-cursor" (paragraph-ends, 1, 1)
134   };
135   bind "<shift><meta>a" { "move-cursor" (paragraph-ends, 0, 0) };
136   bind "<meta>c" { "copy-clipboard" () };
137   unbind "<ctrl>a";
138   unbind "<shift><ctrl>a";
139   unbind "<ctrl>c";
140 }
141
142 @binding-set gtk-mac-entry
143 {
144   bind "<meta>a" {
145     "move-cursor" (buffer-ends, -1, 0)
146     "move-cursor" (buffer-ends, 1, 1)
147   };
148   bind "<shift><meta>a" { "move-cursor" (visual-positions, 0, 0) };
149   unbind "<ctrl>a";
150   unbind "<shift><ctrl>a";
151 }
152
153 @binding-set gtk-mac-file-chooser
154 {
155   bind "<meta>v" { "location-popup-on-paste" () };
156   unbind "<ctrl>v";
157
158   bind "<meta><shift>G" { "location-popup" () };
159   bind "<meta><shift>H" { "home-folder" () };
160   bind "<meta>Up" { "up-folder" () };
161 }
162
163 @binding-set gtk-mac-tree-view
164 {
165   bind "<meta>a" { "select-all" () };
166   bind "<shift><meta>a" { "unselect-all" () };
167   bind "<meta>f" { "start-interactive-search" () };
168   bind "<meta>F" { "start-interactive-search" () };
169   unbind "<ctrl>a";
170   unbind "<shift><ctrl>a";
171   unbind "<ctrl>f";
172   unbind "<ctrl>F";
173 }
174
175 @binding-set gtk-mac-icon-view
176 {
177   bind "<meta>a" { "select-all" () };
178   bind "<shift><meta>a" { "unselect-all" () };
179   unbind "<ctrl>a";
180   unbind "<shift><ctrl>a";
181 }
182
183 GtkIconView {
184   gtk-key-bindings: gtk-mac-icon-view;
185 }
186
187 GtkTextView {
188   gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-alt-delete, gtk-mac-cmd-c, gtk-mac-text-view;
189 }
190
191 GtkEntry {
192   gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-alt-delete, gtk-mac-cmd-c, gtk-mac-entry;
193 }
194
195 GtkLabel {
196   gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-label;
197 }
198
199 GtkFileChooserDefault {
200   gtk-key-bindings: gtk-mac-file-chooser;
201 }
202
203 GtkTreeView {
204   gtk-key-bindings: gtk-mac-tree-view;
205 }