-
Notifications
You must be signed in to change notification settings - Fork 4
/
karabiner.edn
480 lines (427 loc) · 25.6 KB
/
karabiner.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
{
;; ! | means mandatory - modifier(s) alone when pressend change behavior
;; # | means optional - modifiers are optional (but atleast one necessary)
;; :!Ca is keycode :a and prefix a with !C
;; C | left_command
;; T | left_control
;; O | left_option
;; S | left_shift
;; F | fn
;; Q | right_command
;; W | right_control
;; E | right_option
;; R | right_shift
;; ## | optional any
;; !! | command + control + optional + shift (hyper)
;; Install via brew: `brew install yqrashawn/goku/goku`
;; karabiner docs: ;; https://pqrs.org/osx/karabiner/json.html#complex_modifications-manipulator-definition
;; <other options> includs ~to_if_alone~, ~to_if_held_down~,~to_after_key_up~, ~to_delayed_action~ and ~parameters~.
;; (custom variables) & modifiers -> Advanced
;; https://github.com/yqrashawn/GokuRakuJoudo/blob/master/examples.org#custom-variable
;; Examples: https://github.com/yqrashawn/GokuRakuJoudo/blob/master/examples.org
;; https://gist.github.com/kaushikgopal/ff7a92bbc887e59699c804b59074a126
;; https://github.com/kchen0x/k-goku/blob/master/karabiner.edn
:profiles {
:Default { :default true
:sim 50 ;; simultaneous_threshold_milliseconds (def: 50)
;; keys need to be pressed within this threshold to be considered simultaneous
:delay 300 ;; to_delayed_action_delay_milliseconds (def: 500)
;; basically it means time after which the key press is count delayed
:alone 300 ;; to_if_alone_timeout_milliseconds (def: 1000)
;; hold for 995s and single tap registered; hold for 1005s and seen as modifier
:held 500 ;; to_if_held_down_threshold_milliseconds (def: 500)
;; key is fired twice when 500 ms is elapsed (otherwise seen as a hold command)
}
} ;; profiles
:templates {
:open "open -a '%s'" ;; :open "Safari"
:openApp "open \"%s\"" ;; :open "/Applications/Safari.app"
:openFinder "open \"/System/Library/CoreServices/Finder.app\"" ;; "openFinder" to switch to the Finder
:screen_capture_clipboard "screencapture -ixc" ;; Capture screen interactive and silent to clipboard
:screen_capture_preview "screencapture -ixP" ;; Capture screen interactive and silent to Preview.
;; Note: Allow 'karabiner_console_user_server'
;; to record the screen in 'System Preferences' /
;; 'Security & Privacy' / 'Privacy' / 'Screen Recording'.
:applescript "osascript '/Users/albert/Library/Mobile Documents/com~apple~ScriptEditor2/Documents/%s'"
;; Full path to user's 'iCloud Drive/Script Editor'
;; You can't use '~' for the users home directory
:ui_audio_enabled "defaults write 'Apple Global Domain' com.apple.sound.uiaudio.enabled -int %s"
;; Enable or disable "Play user interface sound effects"
;; ui_audio_enabled 0 (off) or 1 (on)
:notification "osascript -e 'display notification \"%s\" with title \"%s\"'"
;; Display notification
;; notifcation "text" "title"
:type "osascript -e 'tell application \"System Events\" to keystroke \"%s\" as text'"
:snippet "cat '/Users/albert/Library/Mobile Documents/com~apple~CloudDocs/Snippets/%s' | pbcopy -pboard general"
:beep "osascript -e 'beep'" ;; Play default beep
:purr "afplay /System/Library/Sounds/Purr.aiff" ;; Play the Purr sound
:tink "afplay /System/Library/Sounds/Tink.aiff" ;; Play the Tink sound
:hammerspoon "open -g hammerspoon://%s" ;; Call Hammerspoon eventhandler
} ;; templates
:applications { ;; Get the app id: `osascript -e 'id of app "VSCodium"'`
:chrome ["^com\\.google\\.Chrome$"]
:safari ["^com\\.apple\\.Safari$"]
:firefox ["^org\\.mozilla\\.firefoxdeveloperedition$"]
:finder ["^com\\.apple\\.finder$"]
:code ["^com\\.visualstudio\\.code\\.oss$"
"^com\\.microsoft\\.VSCode(Insiders)?$"
"^com\\.microsoft\\.VSCode?$"]
:typora ["^abnerworks\\.Typora$"]
:notes ["^com\\.apple\\.Notes$"]
:fusion ["^com\\.apple\\.fusion$"]
}
;; layers are basically "hyper" keys
;; press this in combination with something else and depending on your rule, make things happen
:layers {
:hyper-mode {:key :caps_lock :alone {:key :escape}} ;; make the caps_lock key the hyper key
;; In "System Preferences/Keyboard/Modifier Keys..."
;; the Caps Lock Key is set to "No Action".
:slash-mode {:key :slash} ;; '/' + vowel = acute accent
:semicolon-mode {:key :semicolon} ;; ';' + vowel = umlaut
:backslash-mode {:key :backslash} ;; '\' + vowel = grave accent
:6-mode {:key :6} ;; '6' + vowel = circumflex
} ;; layers
;; simlayers are basically "hyper" keys
;; layers works too, but only recommended for non-typing keys like . or tab
;; or keys like z which are used less often
:simlayers {
:e-mode {:key :e} ;; make the e-key a simlayer key
:o-mode {:key :o} ;; make the o-key a simlayer key
;:v-mode {:key :v} ;; make the v-key a simlayer key
:space-mode {:key :spacebar} ;; make the spacebar a simlayer key
:hammer-mode {:key :h} ;; make the h-key a Hammerspoon eventhandler key
} ;; simlayers
;; Define different kinds of keyboards
:devices {
:kb-apple [
{:vendor_id 1452} ;; product_id 636 for MacBook Pro (15-inch, 2018) internal keyboard
{:vendor_id 76}
]
:magicforce68 [ ;; Qisan Magicforce 68 keyboard without backlight
{:vendor_id 1241,
:product_id 41208 }]
:magicforce68-backlight ;; Qisan Magicforce 68 keyboard with backlight
[{:vendor_id 1241,
:product_id 36 }]
:kb-all [ ;; Group with all keyboards
{:vendor_id 1452}
{:vendor_id 76}
{:vendor_id 1241, :product_id 36 }
{:vendor_id 1241, :product_id 41208 }
]
:kb-magicforce68 [ ;; Group with Magicforce 68-key keyboards
{:vendor_id 1241, :product_id 36 }
{:vendor_id 1241, :product_id 41208 }
]
:kb-keychron-k1 [
{:vendor_id 1452, product_id 591 } ;; Keychron K1 keyboard
]
} ;; devices
;; main contains multiple manipulators
:main [
;; each manipulator has a description and multiple rules
;;{:des "..." ;; -> description
;; :rules[
;; [<from> <to> <conditions>] ;; -> rule 1
;; [<from> <to> <conditions>] ;; -> rule 2
;; ]}
;; rule [:period ["period-mode" 1] nil {:afterup ["period-mode" 0] :alone :period}]
;; |_____| |_______________| |_| |_________________________________________|
;; <from> <to> <conditions> <other options>
;; Tab is set to hyperkey for Hammerspoon, alone it acts as tab.
{:des "Tab to Hyper/Tab, trigger for Hammerspoon"
:rules [
[:##tab :!CTOleft_shift nil {:alone :tab}]
]
}
;; The Magicforce keyboards have a PC layout, I swapped the Windows- and Alt-key on the left side.
;; Swapping the physical keys and virtually in karabiner-elements make the layout behave like a Mac keyboard.
;; It does require extra rules for combinations with other modifier keys.
;; This is the simplified version of the keycombinations below, so without the 'alone' functionality.
; {:des "Magicforce68 - swap left-option and left-command"
; :rules [ :kb-magicforce68
; [:##left_command :left_option]
; [:##left_option :left_command]
; [:!Sleft_option :!Sleft_command] ;; fix for shift_option
; [:!Sleft_command :!Sleft_option] ;; fix for shift_command
; [:!Tleft_option :!Tleft_command] ;; fix for control_option
; [:!Tleft_command :!Tleft_option] ;; fix for control_command
; ]
; }
;; The Magicforce keyboards have a PC layout, I swapped the Windows- and Alt-key on the left side.
;; Swapping the physical keys and virtually in karabiner-elements make the layout behave like a Mac keyboard.
;; Additional shortcut for command+tab to switch between the current and previous application
;; Additional shortcut for command+tilde to cycle through the open windows of an application
;; It does require extra rules for combinations with other modifier keys.
{:des "Magicforce68 - swap left-option and -command and add cmd-tilde and cmd-tab to the standalone keys"
:rules [ :kb-magicforce68
[:left_command :left_option nil {:alone [:!Cgrave_accent_and_tilde]}]
[:left_option :left_command nil {:alone [:!Ctab]}]
[:!Sleft_option :!Sleft_command] ;; fix for shift_option
[:!Sleft_command :!Sleft_option] ;; fix for shift_command
[:!Tleft_option :!Tleft_command] ;; fix for control_option
[:!Tleft_command :!Tleft_option] ;; fix for control_command
]
}
;; The Magicforce is a 68 key keyboard with a combined escape_grave_accent_and_tilde key.
;; Capslock alone is set to behave like the Escape-key, with this setting the key is
;; forced to tilde and grave-accent.
;; Additional rule required for command-tilde behaviour.
;; Note: On the backlight version there is an override with Fn-Q.
{:des "Magicforce68 - set escape to grave_accent_and_tilde"
:rules [ :kb-magicforce68
[:escape :grave_accent_and_tilde]
[:!Cescape :!Cgrave_accent_and_tilde]
]
}
;; The function key on Apple keyboards can be used in Karabiner,
;; it does not work for the function key on my Qisan-Magicfoce keyboard.
{:des "Apple keyboard - fn + l to Lock-screen, fn + s to Sleep"
:rules [ :kb-apple
[:!Fl [:!CTq]] ;; Function + l to Lock Screen (Command-Control-Q)
[:!Fz [:!COeject]] ;; Function + s to Sleep (Command-Option-Eject)
]
}
;; The microphone button by default does function + spacebar on the Keychron K1 keyboard,
;; with this it becomes the "Copy picture of selected area to clipboard".
{:des "Keychron K1 - microphone button becomes 'Copy picture of selected area to clipboard'"
:rules [ :kb-keychron-k1
[[:fn :spacebar] [:screen_capture_clipboard]] ;; Silently capture selected area to clipboard
]
}
;; Special VMware Fusion keys
{:des "Fusion shortcuts"
:rules [ :fusion
[:!Cright_arrow [:end]] ; 's' - Toggle sidebar
[:!Cleft_arrow [:home]] ; 's' - Toggle sidebar
[:!Cb [:!OF4]] ; 's' - Toggle sidebar
]
}
;; Shortcut `command` for command+tab to switch between the current and previous application
;; Shortcut `option` for command+tilde to cycle through the open windows of an application
;; Shortcut `control` for control+tab to go to the next tab in most applications
;; Due to the switched left-option and -command on the Magicforce keyboard, two rules are excluded.
;; Functionality for the left-option and left-command is handled in the Magicforce specific rules.
;; Command-tab s not implemented in the same way across applications. This results either in looping
;; through the tabs or toggling between two tabs. To create the same experience everywhere specific
;; sequences need to be build. For VSCodium I experimented with with Ctrl+tab twice.
{:des "Change command to cmd+tab, option to cmd+tilde and control to ctrl+tab when pressed `alone`"
:rules [
[:##left_command :left_command [:!kb-magicforce68] {:alone [:!Ctab]}]
[:##left_option :left_option [:!kb-magicforce68] {:alone [:!Cgrave_accent_and_tilde]}]
[:##left_control :left_control [:!code] {:alone [:!Ttab]}]
[:##left_control :left_control [:code] {:alone [:!Ttab :!Ttab]}]
[:##right_command :right_command nil {:alone [:!Ctab]}]
[:##right_option :right_option nil {:alone [:!Cgrave_accent_and_tilde]}]
[:##right_control :right_control [:!code] {:alone [:!Wtab]}]
[:##right_control :right_control [:code] {:alone [:!Wtab :!Wtab]}]
]
}
;; Use e-key key to launch apps or actions
{:des "e-key shortcuts" ; Hold 'e' + extra key
:rules [ :e-mode
[:m [:!TCspacebar]] ; 'm' - Emoji picker
]
}
;; Use o-key to launch apps or actions
;; Mostly examples
{:des "o-key shortcuts (example)" ; Hold 'o' + extra key
:rules [ :o-mode
[:s [:open "Safari"]] ; 's' - Open Safari
[:m [:type "Moi,oet Grunn!"]] ; 'm' - Type some text
[:b [:beep]] ; 'b' - beep
[:p [:purr]] ; 'p' - play "Purr"
[:t [:tink]] ; 't' - play "Tink"
[:a ["say 'You are awesome!'"]]
[:f ["osascript -e 'tell app \"Finder\" to make new Finder window'"]]
[:h ["osascript -e 'display dialog \"Hello from Karabiner-elements\" with title \"The title!\"'"]]
]
}
;; Use spacebar to launch apps or actions
;; Mostly as example
{:des "Spacebar shortcuts" ; Hold 'space' + extra key
:rules [ :space-mode
[:e [:!TCspacebar]] ; 'e' - Emoji picker
[:f [:openFinder]] ; 'f' - Open Finder
[:p [:open "Preview"]] ; 'p' - Open Preview
[:i [:open "iTerm"]] ; 'i' - Open iTerm2
[:k [:open "Kitty"]] ; 'k' - Open Kitty
[:m [:hammerspoon "showMouse"]] ; 'm' - Show the mouse cursor
[:t [:open "Typora"]] ; 't' - Open Typora
[:c [:open "Scapple"]] ; 'c' - Open Scapple
[:s [:open "Safari"]] ; 's' - Open Safari
[:o [:applescript "Open in VSCodium.scpt"] :finder] ; 'o' - Finder specific, open file or folder in VSCodium
]
}
;; Special 'vowel' characters, '/', ';' and '\' are easy to remember as shortcut keys
{:des "Lowercase diacritic characters - '/' for acute accent and ';' for umlaut, '\\' for grave accent and '6' for circumflex. Example: 'slash' + 'a' = á"
:rules [
[:a [:!Oe :a] [:slash-mode]] ; '/' + a = á
[:e [:!Oe :e] [:slash-mode]] ; '/' + e = é
[:i [:!Oe :i] [:slash-mode]] ; '/' + i = í
[:o [:!Oe :o] [:slash-mode]] ; '/' + o = ó
[:u [:!Oe :u] [:slash-mode]] ; '/' + u = ú
[:a [:!Ou :a] [:semicolon-mode]] ; ';' + a = ä
[:e [:!Ou :e] [:semicolon-mode]] ; ';' + e = ë
[:i [:!Ou :i] [:semicolon-mode]] ; ';' + i = ï
[:o [:!Ou :o] [:semicolon-mode]] ; ';' + o = ö
[:u [:!Ou :u] [:semicolon-mode]] ; ';' + u = ü
[:a [:!Ograve_accent_and_tilde :a] [:backslash-mode]] ; '\' + a = à
[:e [:!Ograve_accent_and_tilde :e] [:backslash-mode]] ; '\' + e = è
[:i [:!Ograve_accent_and_tilde :i] [:backslash-mode]] ; '\' + i = ì
[:o [:!Ograve_accent_and_tilde :o] [:backslash-mode]] ; '\' + o = ò
[:u [:!Ograve_accent_and_tilde :u] [:backslash-mode]] ; '\' + u = ù
[:a [:!Oi :a] [:6-mode]] ; '/' + a = â
[:e [:!Oi :e] [:6-mode]] ; '/' + e = ê
[:i [:!Oi :i] [:6-mode]] ; '/' + i = î
[:o [:!Oi :o] [:6-mode]] ; '/' + o = ô
[:u [:!Oi :u] [:6-mode]] ; '/' + u = û
]
}
;; Special 'vowel' characters, '/', ';' and '\' are easy to remember as shortcut keys
{:des "Uppercase diacritic characters - '/' for acute accent and ';' for umlaut, '\\' for grave accent and '6' for circumflex. Example: 'slash' + ['shift' + 'a'] = Á"
:rules [
[{:key :a :modi :shift} [:!Oe :!Sa] [:slash-mode]] ; '/' + a = Á
[{:key :e :modi :shift} [:!Oe :!Se] [:slash-mode]] ; '/' + e = É
[{:key :i :modi :shift} [:!Oe :!Si] [:slash-mode]] ; '/' + i = Í
[{:key :o :modi :shift} [:!Oe :!So] [:slash-mode]] ; '/' + o = Ó
[{:key :u :modi :shift} [:!Oe :!Su] [:slash-mode]] ; '/' + u = Ú
[{:key :a :modi :shift} [:!Ou :!Sa] [:semicolon-mode]] ; ';' + a = Ä
[{:key :e :modi :shift} [:!Ou :!Se] [:semicolon-mode]] ; ';' + e = Ë
[{:key :i :modi :shift} [:!Ou :!Si] [:semicolon-mode]] ; ';' + i = Ï
[{:key :o :modi :shift} [:!Ou :!So] [:semicolon-mode]] ; ';' + o = Ö
[{:key :u :modi :shift} [:!Ou :!Su] [:semicolon-mode]] ; ';' + u = Ü
[{:key :a :modi :shift} [:!Ograve_accent_and_tilde :!Sa] [:backslash-mode]] ; '\' + a = À
[{:key :e :modi :shift} [:!Ograve_accent_and_tilde :!Se] [:backslash-mode]] ; '\' + e = È
[{:key :i :modi :shift} [:!Ograve_accent_and_tilde :!Si] [:backslash-mode]] ; '\' + i = Ì
[{:key :o :modi :shift} [:!Ograve_accent_and_tilde :!So] [:backslash-mode]] ; '\' + o = Ò
[{:key :u :modi :shift} [:!Ograve_accent_and_tilde :!Su] [:backslash-mode]] ; '\' + u = Ù
[{:key :a :modi :shift} [:!Oi :!Sa] [:6-mode]] ; '/' + a = Â
[{:key :e :modi :shift} [:!Oi :!Se] [:6-mode]] ; '/' + e = Ê
[{:key :i :modi :shift} [:!Oi :!Si] [:6-mode]] ; '/' + i = Î
[{:key :o :modi :shift} [:!Oi :!So] [:6-mode]] ; '/' + o = Ò
[{:key :u :modi :shift} [:!Oi :!Su] [:6-mode]] ; '/' + u = Ù
]
}
;; Use hyper key to change the volume
{:des "Volume increment and decrement with 'hyper' key and '0', '-' or '+' to mute, decrease or increase volume"
:rules [ :hyper-mode
[:0 [:mute]] ; 'v' + '0' mute volume
[:hyphen [:volume_decrement]] ; 'v' + '-' decrement volume
[:equal_sign [:volume_increment]] ; 'v' + '+' increment volume
]
}
;; Borrowed and modified from kchen0x/k-goku, interesting feature, not sure how and when to use it.
;; Hyperkey (caps_lock) + arrow key to move the cursor
;; Hyperkey (caps_lock) + shift + arrow key to move the cursor at half the speed
;; Hyperkey (caps_lock) + left_shift + left_control + arrow key to move the cursor at quarter the speed
;; Hyperkey + return for mouse button 1
;; Hyperkey + command + return for mouse button 2
{:des "Hyper Mode mousekey movement (left_shift or left_shift + left_control reduce the speed)"
:rules [ :hyper-mode
[:down_arrow {:mkey {:y 1200}}]
[:up_arrow {:mkey {:y -1200}}]
[:left_arrow {:mkey {:x -1200}}]
[:right_arrow {:mkey {:x 1200}}]
[:!Sdown_arrow {:mkey {:y 600}}]
[:!Sup_arrow {:mkey {:y -600}}]
[:!Sleft_arrow {:mkey {:x -600}}]
[:!Sright_arrow {:mkey {:x 600}}]
[:!TSdown_arrow {:mkey {:y 300}}]
[:!TSup_arrow {:mkey {:y -300}}]
[:!TSleft_arrow {:mkey {:x -300}}]
[:!TSright_arrow {:mkey {:x 300}}]
[:return_or_enter {:pkey :button1}]
[:!Creturn_or_enter {:pkey :button2}]
]
}
;; Borrowed from kchen0x/k-goku, interesting feature, not sure if I want to use it.
; {:des "Quit application by pressing command-q twice"
; :rules [[:!C#Pq [:!Cq ["command-q" 0]] ["command-q" 1]]
; [:!C#Pq ["command-q" 1] nil {:delayed {:invoked ["command-q" 0] :canceled ["command-q" 0]}}]
; ]
; }
;; Browser specific: save all tabs to a markdown file.
;; Option + 'o' saves all tabs to a MarkDown file
;; Info on the used AppleScript: "https://tisgoud.nl/2020/04/saving-the-yak-browser-trail/"
;; and some fun examples
{:des "Safari: run script to save tabs to markdown (left-option + 'o')"
:rules [ :safari
[:!Os [:applescript "SaveSafariTabsToMarkdown.scpt"]]
]
}
;; Browser specific: save all tabs to a markdown file.
;; Option + 'o' saves all tabs to a MarkDown file
;; Info on the used AppleScript: "https://tisgoud.nl/2020/04/saving-the-yak-browser-trail/"
{:des "Google Chrome: run script to save tabs to markdown (left-option + 'o')"
:rules [ :chrome
[:!Os [:applescript "SaveChromeTabsToMarkdown.scpt"]]
]
}
;; Finder specific: open selected file or directory in VSCodium.
;; Info on the used AppleScript: "https://tisgoud.nl/2019/09/open-in-vscodium/"
{:des "Finder: run script to open selected file or directory in VSCodium (right-option + 'o')"
:rules [ :finder
[:!Eo [:applescript "Open in VSCodium.scpt"]] ; right_option + 'o' to open the file or folder in VSCodium
]
}
;; Use caps_lock key to launch apps or actions in VSCode/VSCodium
{:des "VSCode/VSCodium shortcuts" ; Hold 'caps_lock' + extra key
:rules [ :hyper-mode
[:t [:!TSgrave_accent_and_tilde] :code] ; 't' - Open terminal
[:h [:snippet "hugo_frontmatter.txt"] :code] ; 'h' - Copy snippet to clipboard
]
}
;; Use caps_lock key to launch apps or actions in VSCode/VSCodium
{:des "Typora shortcuts" ; Hold 'caps_lock' + extra key
:rules [ :hyper-mode
[:h [[:notification "Hugo frontmatter copied to clipboard" "Clipboard"] [:snippet "hugo_frontmatter.txt"]] :typora] ; 'h' - Copy snippet to clipboard
]
}
;; Use caps_lock key to launch apps or actions in VSCode/VSCodium
{:des "Notepad shortcuts" ; Hold 'caps_lock' + extra key
:rules [ :hyper-mode
[:s [:!OCs] :notes] ; 's' - Toggle sidebar
]
}
{:des "Hammerspoon shortcuts via UrlEvents" ; Hold 'h' + extra key
:rules [ :hammer-mode
[:m [:hammerspoon "showMouse"]] ; 'm'
[:t [:hammerspoon "toggleMic"]] ; 't'
[:n [:hammerspoon "translate_NL_to_EN"]] ; 'n'
[:e [:hammerspoon "translate_EN_to_NL"]] ; 'e'
[:d [:hammerspoon "translate_DE_to_NL"]] ; 'd'
[:r [:hammerspoon "reloadConfig"]] ; Reload Hammerspoon config
]
}
;; Use hyper key to launch apps or actions
{:des "Global Hyper-mode shortcuts" ; Hold 'caps_lock' + extra key
:rules [ :hyper-mode
[:l [:!CTq]] ; 'l' - Lock Screen (Command-Control-Q)
[:z [:!COeject]] ; 'z' - Sleep (Command-Option-Eject)
[:e [:!TCspacebar]] ; 'e' - Emoji picker
[:o [:applescript "Open in VSCodium.scpt"] :finder] ; 'o' - Finder specific, open file or folder in VSCodium
[:u [[:notification "🔕" "UI Sound effects off"] [:ui_audio_enabled "0"] ["audio_off" 1]] :!audio_off]
[:u [[:notification "🔔" "UI Sound effects on"] [:ui_audio_enabled "1"] ["audio_off" 0]] :audio_off]
[:slash [:openFinder]] ; '/' - Open Finder
[:p [:open "Preview"]] ; 'p' - Open Preview
[:a [:open "Safari"]] ; 'a' - Open Safari
[:f [:open "Firefox Developer Edition"]] ; 'f' - Open Firefox
[:k [:open "Kubernetic"]] ; 'k' - Open Kubernetic
[:g [:open "Google Chrome"]] ; 'g' - Open Google Chrome
[:t [:open "iTerm"]] ; 't' - Open iTerm 'console' or 'commandline'
[:y [:open "Typora"]] ; 'y' - Open Typora
[:v [:open "VSCodium"]] ; 'v' - Open VSCodium
[:s [:!Cb] :code] ; 's' - Toggle sidebar
[:s [:!OCs] :notes] ; 's' - Toggle sidebar
[:s [:!SCl] :safari] ; 's' - Toggle sidebar
[:s [:!SCl] :typora] ; 's' - Toggle sidebar
[:1 [:screen_capture_clipboard]] ; '1' - Silent screenshot to clipboard [:!TSC4]
[:2 [:!SC2]] ; '2' - OCR Screenshot with TextSniper, default shortcut
[:4 [:screen_capture_clipboard]] ; '4' - Silent screenshot to clipboard [:!TSC4]
[:5 [:!SC5]] ; '5' - Screenshot and recording options
[:d [:open "Dictionary"]] ; 'd' - Look up in Dictionary
]
}
] ;; main
} ;; EOFh