Sources/OrgCore/Keymap/PresetMac.swift
303 lines · 8068 bytes
1extension KeymapPreset {
2 static let macBindings = """
3 [[bind]]
4 keys = "C-TAB"
5 command = "app.buffer.next"
6 [[bind]]
7 keys = "C-S-TAB"
8 command = "app.buffer.previous"
9 [[bind]]
10 keys = "C-s-2"
11 command = "app.split-below"
12 [[bind]]
13 keys = "C-s-3"
14 command = "app.split-right"
15 [[bind]]
16 keys = "C-s-0"
17 command = "app.pane-close"
18 [[bind]]
19 keys = "C-s-1"
20 command = "app.pane-only"
21 [[bind]]
22 keys = "M-s-`"
23 command = "app.pane-next"
24 [[bind]]
25 keys = "M-s-n"
26 command = "app.window-new"
27 [[bind]]
28 keys = "C-s-t"
29 command = "org.todo.cycle"
30 [[bind]]
31 keys = "C-s-<up>"
32 command = "org.priority.up"
33 [[bind]]
34 keys = "C-s-<down>"
35 command = "org.priority.down"
36 [[bind]]
37 keys = "C-s-<left>"
38 command = "org.heading.promote"
39 [[bind]]
40 keys = "C-s-<right>"
41 command = "org.heading.demote"
42 [[bind]]
43 keys = "C-M-s-<left>"
44 command = "org.subtree.promote"
45 [[bind]]
46 keys = "C-M-s-<right>"
47 command = "org.subtree.demote"
48 [[bind]]
49 keys = "C-M-s-<up>"
50 command = "org.subtree.up"
51 [[bind]]
52 keys = "C-M-s-<down>"
53 command = "org.subtree.down"
54 [[bind]]
55 keys = "s-RET"
56 command = "org.heading.insert"
57 [[bind]]
58 keys = "C-s-RET"
59 command = "org.heading.insert-after-subtree"
60 [[bind]]
61 keys = "s-S-RET"
62 command = "org.heading.insert-todo"
63 [[bind]]
64 keys = "M-s-<down>"
65 command = "org.heading.next"
66 [[bind]]
67 keys = "M-s-<up>"
68 command = "org.heading.previous"
69 [[bind]]
70 keys = "C-s-g"
71 command = "org.tags.set"
72 [[bind]]
73 keys = "s-RET"
74 command = "org.item.insert"
75 when = "item"
76 [[bind]]
77 keys = "s-S-RET"
78 command = "org.item.insert-checkbox"
79 when = "item"
80 [[bind]]
81 keys = "C-s-<left>"
82 command = "org.item.outdent"
83 when = "item"
84 [[bind]]
85 keys = "C-s-<right>"
86 command = "org.item.indent"
87 when = "item"
88 [[bind]]
89 keys = "C-M-s-<left>"
90 command = "org.item.outdent-tree"
91 when = "item"
92 [[bind]]
93 keys = "C-M-s-<right>"
94 command = "org.item.indent-tree"
95 when = "item"
96 [[bind]]
97 keys = "C-M-s-<up>"
98 command = "org.item.up"
99 when = "item"
100 [[bind]]
101 keys = "C-M-s-<down>"
102 command = "org.item.down"
103 when = "item"
104 [[bind]]
105 keys = "C-s-c"
106 command = "org.checkbox.toggle"
107 [[bind]]
108 keys = "C-s-w"
109 command = "app.refile"
110 [[bind]]
111 keys = "C-s-a"
112 command = "app.archive"
113 [[bind]]
114 keys = "C-s-."
115 command = "org.timestamp.active"
116 [[bind]]
117 keys = "C-M-s-."
118 command = "org.timestamp.inactive"
119 [[bind]]
120 keys = "C-s-s"
121 command = "org.schedule"
122 [[bind]]
123 keys = "C-s-e"
124 command = "org.deadline"
125 [[bind]]
126 keys = "C-M-s-s"
127 command = "org.schedule.remove"
128 [[bind]]
129 keys = "C-M-s-e"
130 command = "org.deadline.remove"
131 [[bind]]
132 keys = "C-s-p"
133 command = "org.fill-paragraph"
134 [[bind]]
135 keys = "C-s-<up>"
136 command = "org.table.row-up"
137 when = "table"
138 [[bind]]
139 keys = "C-s-<down>"
140 command = "org.table.row-down"
141 when = "table"
142 [[bind]]
143 keys = "C-s-<left>"
144 command = "org.table.column-left"
145 when = "table"
146 [[bind]]
147 keys = "C-s-<right>"
148 command = "org.table.column-right"
149 when = "table"
150 [[bind]]
151 keys = "C-M-s-<right>"
152 command = "org.table.insert-column"
153 when = "table"
154 [[bind]]
155 keys = "C-M-s-<left>"
156 command = "org.table.delete-column"
157 when = "table"
158 [[bind]]
159 keys = "C-M-s-<up>"
160 command = "org.table.kill-row"
161 when = "table"
162 [[bind]]
163 keys = "C-M-s-<down>"
164 command = "org.table.insert-row"
165 when = "table"
166 [[bind]]
167 keys = "C-s--"
168 command = "org.table.insert-hline"
169 when = "table"
170 [[bind]]
171 keys = "C-s-*"
172 command = "org.table.recalc"
173 when = "table"
174 [[bind]]
175 keys = "C-s-\\\\"
176 command = "org.table.create"
177 [[bind]]
178 keys = "C-s-<up>"
179 command = "org.timestamp.up"
180 when = "timestamp"
181 [[bind]]
182 keys = "C-s-<down>"
183 command = "org.timestamp.down"
184 when = "timestamp"
185 [[bind]]
186 keys = "C-s-<right>"
187 command = "org.timestamp.day-later"
188 when = "timestamp"
189 [[bind]]
190 keys = "C-s-<left>"
191 command = "org.timestamp.day-earlier"
192 when = "timestamp"
193
194 # Act at point, links, clocking, export and the rest of C-c.
195 [[bind]]
196 keys = "C-s-x"
197 command = "org.ctrl-c-ctrl-c"
198 [[bind]]
199 keys = "C-s-x"
200 command = "org.dblock.update"
201 when = "dblock"
202 [[bind]]
203 keys = "C-s-x"
204 command = "org.table.recalc-all"
205 when = "tblfm"
206 [[bind]]
207 keys = "C-s-x"
208 command = "org.babel.execute"
209 when = "src"
210 [[bind]]
211 keys = "s-k"
212 command = "org.link.insert"
213 [[bind]]
214 keys = "s-b"
215 command = "org.emphasize.bold"
216 [[bind]]
217 keys = "s-i"
218 command = "org.emphasize.italic"
219 [[bind]]
220 keys = "s-u"
221 command = "org.emphasize.underline"
222 [[bind]]
223 keys = "C-s-o"
224 command = "org.link.open"
225 [[bind]]
226 keys = "C-s-l"
227 command = "org.link.store"
228 [[bind]]
229 keys = "C-s-i"
230 command = "app.clock.in"
231 [[bind]]
232 keys = "C-S-s-i"
233 command = "app.clock.out"
234 [[bind]]
235 keys = "C-s-j"
236 command = "app.clock.goto"
237 [[bind]]
238 keys = "C-M-s-i"
239 command = "app.clock.in-recent"
240 [[bind]]
241 keys = "C-M-s-j"
242 command = "app.clock.goto-recent"
243 [[bind]]
244 keys = "C-s-k"
245 command = "app.clock.cancel"
246 [[bind]]
247 keys = "s-S-e"
248 command = "app.export-dialog"
249 [[bind]]
250 keys = "C-s-n"
251 command = "org.narrow.toggle"
252 [[bind]]
253 keys = "C-S-s-s"
254 command = "org.sort"
255 [[bind]]
256 keys = "C-S-s-p"
257 command = "org.property.read-and-set"
258 [[bind]]
259 keys = "C-S-s-f"
260 command = "org.footnote.action"
261 [[bind]]
262 keys = "C-s-'"
263 command = "org.edit-special"
264 [[bind]]
265 keys = "C-S-s-<right>"
266 command = "org.todo.next"
267 when = "heading"
268 [[bind]]
269 keys = "C-S-s-<left>"
270 command = "org.todo.previous"
271 when = "heading"
272 [[bind]]
273 keys = "C-S-s-<right>"
274 command = "org.property.next-value"
275 when = "property"
276 [[bind]]
277 keys = "C-S-s-<left>"
278 command = "org.property.previous-value"
279 when = "property"
280 [[bind]]
281 keys = "M-S-s-<down>"
282 command = "org.heading.forward-same-level"
283 [[bind]]
284 keys = "M-S-s-<up>"
285 command = "org.heading.backward-same-level"
286 [[bind]]
287 keys = "C-S-s-e"
288 command = "org.effort.set"
289 [[bind]]
290 keys = "C-s-,"
291 command = "org.priority.set"
292 [[bind]]
293 keys = "C-s-v"
294 command = "org.babel.tangle"
295 [[bind]]
296 keys = "C-S-s-v"
297 command = "org.babel.tangle-block"
298 [[bind]]
299 keys = "C-M-s-v"
300 command = "org.babel.tangle-target"
301
302 """
303}