krz/orgstar

A native macOS editor for org-mode files. editor org-mode swift

Commit 24b5036e3f

24b5036e3f7934b3bb6f198d54e3c9b0df7a8c26

parent: f984b02522

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-09 01:04 UTC

Mac keys for cancel clock, recalculate row and single tangles

⌃⌘K cancels the clock, ⌃⌘* recalculates the table row, ⌃⇧⌘V tangles the block and ⌃⌥⌘V the block's target.

Layout: unified · split

Sources/OrgCore/Keymap/Presets.swift +13
@@ -1228,6 +1228,10 @@ public enum KeymapPreset: String, Sendable, CaseIterable {
1228 command = "org.table.insert-hline" 1228 command = "org.table.insert-hline"
1229 when = "table" 1229 when = "table"
1230 [[bind]] 1230 [[bind]]
1231 keys = "C-s-*"
1232 command = "org.table.recalc"
1233 when = "table"
1234 [[bind]]
1231 keys = "C-s-\\\\" 1235 keys = "C-s-\\\\"
1232 command = "org.table.create" 1236 command = "org.table.create"
1233 [[bind]] 1237 [[bind]]
@@ -1288,6 +1292,9 @@ public enum KeymapPreset: String, Sendable, CaseIterable {
1288 keys = "C-M-s-j" 1292 keys = "C-M-s-j"
1289 command = "app.clock.goto-recent" 1293 command = "app.clock.goto-recent"
1290 [[bind]] 1294 [[bind]]
1295 keys = "C-s-k"
1296 command = "app.clock.cancel"
1297 [[bind]]
1291 keys = "s-S-e" 1298 keys = "s-S-e"
1292 command = "app.export-dialog" 1299 command = "app.export-dialog"
1293 [[bind]] 1300 [[bind]]
@@ -1336,6 +1343,12 @@ public enum KeymapPreset: String, Sendable, CaseIterable {
1336 [[bind]] 1343 [[bind]]
1337 keys = "C-s-v" 1344 keys = "C-s-v"
1338 command = "org.babel.tangle" 1345 command = "org.babel.tangle"
1346 [[bind]]
1347 keys = "C-S-s-v"
1348 command = "org.babel.tangle-block"
1349 [[bind]]
1350 keys = "C-M-s-v"
1351 command = "org.babel.tangle-target"
1339 1352
1340 """ 1353 """
1341} 1354}
Tests/OrgCoreTests/KeymapTests.swift +2 −1
@@ -162,7 +162,8 @@ struct KeymapTests {
162 ("org.narrow.toggle", "C-s-n"), ("org.sort", "C-s-S"), ("org.property.read-and-set", "C-s-P"), 162 ("org.narrow.toggle", "C-s-n"), ("org.sort", "C-s-S"), ("org.property.read-and-set", "C-s-P"),
163 ("org.footnote.action", "C-s-F"), ("org.edit-special", "C-s-'"), ("org.todo.next", "C-S-s-<right>"), 163 ("org.footnote.action", "C-s-F"), ("org.edit-special", "C-s-'"), ("org.todo.next", "C-S-s-<right>"),
164 ("org.heading.forward-same-level", "M-S-s-<down>"), ("org.effort.set", "C-s-E"), ("org.priority.set", "C-s-,"), 164 ("org.heading.forward-same-level", "M-S-s-<down>"), ("org.effort.set", "C-s-E"), ("org.priority.set", "C-s-,"),
165 ("org.babel.tangle", "C-s-v"), 165 ("org.babel.tangle", "C-s-v"), ("org.babel.tangle-block", "C-s-V"), ("org.babel.tangle-target", "C-M-s-v"),
166 ("app.clock.cancel", "C-s-k"), ("org.table.recalc", "C-s-*"),
166 ] 167 ]
167 for (command, keys) in expected { 168 for (command, keys) in expected {
168 #expect(mac.keys(for: command).map(KeySequence.format) == keys, "\(command)") 169 #expect(mac.keys(for: command).map(KeySequence.format) == keys, "\(command)")