-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkanatav20_noded_final.kbd
1533 lines (1456 loc) · 82.4 KB
/
kanatav20_noded_final.kbd
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
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#|
TOC
start size
0001 133 Documentation/ideas
0133 055 defcfg
0188 033 defvar platform specific characters, timeouts
0221 031 deflocalkeys
0252 026 global aliases virtualkeys: numlock, mods,...
0278 082! templates
0359 079! aliases for layers
0437 116! aliases for (shifted) symbol, tap-hold for numbers, keypad, outerkeys, dynamic-macros
0553 019 aliases for home row mods
0574 017 aliases for chord activation
0591 125 aliases for j!, letter that invoke templates, k, ß, x`, b=, g*, ,;< .:>
0716 059! chords
0775 017 defsrc
0792 023 layer base
0815 015 layer GAME
0830 011 layer notp (no fast typing support)
0841 056! layer CAPS
0897 011 layer fast typing
0908 047 layer numbers & aliases
0955 013 layer numbers fixed
0968 039 layer alt tab & aliases
1007 020 layer symbols
1027 011 layer Numberrow *** Functionrow *** Keypadrow *** dynamic-macro ***
1038 011 layer macro F-keys
1049 085! layers for Mouse
1134 039 more macro sequence definitions
1175
0133 120 lines defcfg defvar deflocalkeys
0252 580 lines aliases(440) templates(80) chords(60)
0775 300 lines layers
Changelog (since v1.6.1)
Added: O-(...) for any-order overlapping keys in sequences.
Added: conditional configuration using environment variables via (environment (name val) ...)
Added: allow double-quotes within strings by adding Rust-style strings r#"<content>"#.
Added: parse numbers as a delay (unit milliseconds) for cmd-output-keys
Added: unmod can accept a modifier list as the first parameter to selectively undo only some modifiers
Added(Windows): capability to use Kanata as a library for AHK
Added(Windows): GUI tray app (gui variants of the executable)
Added(Windows-Interception): add device exclusion (include by default) in defcfg
TIMER
So after defining a timer as virtual key
(defvirtualkey my-timer (macro-release-cancel 500 ...
pressing it (on-... press-vkey my-timer) will starts the timer (again)
releasing it (on-... release-vkey my-timer) will stops the timer - only with macro-release-cancel not with normal macro
BUG Ah right I recall the issue now, I believe it's that the fake-key presses interfere with the tap-dance eager.
Instead of tap-dance eager you might instead want to put the logic in switch, e.g. a case of ((and (input-history real ' 3) (input-history virtual toggle 2))) (multi (on-press release-key toggle) (macro bspc t e s t)) break.
(defsrc
'
)
(deflayer quot
@quo
)
(defalias
quo (tap-dance-eager 5000 (
(switch
((input virtual toggle))
(multi (unicode ”) (on-press release-vkey toggle)) break
() (multi (unicode “) (on-press press-vkey toggle)) break)
(macro bspc t e s t))
)
)
(defvirtualkeys toggle nop0)
TODO https://github.com/jtroo/kanata/issues/1160#event-14262202947 retry JIS keyboard
TODO uses cases for switch (not, key-timing, input, input-history)
HOW TO IMPLEMENT STAT WITH TOGGLE
Using this idea one could implement: Type 2 UPPERCASE letters in sequence to activate CAPS WORDS
I wonder if I would Iike it, or it would confuse me.
(defvirtualkeys toggle nop5)
(defsrc 1)
(deflayer base
(switch
((input virtual toggle))
(multi 2 (on-press release-vkey toggle)) break
() (multi 1 (on-press press-vkey toggle)) break
))
(defvar var1 a)
(defsrc a)
(deffakekeys vk1 XX)
(deffakekeys vk2 XX)
(deflayer base
(switch
((and a b (or c d) (or e f))) XX break
((not (and a b (not (or c (not d))) (or e f)))) XX break
() _ fallthrough
(a b c) $var1 fallthrough
((or (or (or (or (or (or (or (or))))))))) $var1 fallthrough
((key-history a 1) (key-history b 5) (key-history c 8)) $var1 fallthrough
((not
(key-timing 1 less-than 200)
(key-timing 4 greater-than 500)
(key-timing 7 lt 1000)
(key-timing 8 gt 20000)
)) $var1 fallthrough
((input virtual vk1)) $var1 break
((input real lctl)) $var1 break
((input-history virtual vk2 1)) $var1 break
((input-history real lsft 8)) $var1 break
)
)
sadly, kanata configs of other people are really hard to read. But I still extracted this very cool use case for dynamic-macro of yours, I would never have come up with:
switch to a pain layer for just typing (mimic defsrc)
start recording dynamic-macro (without generating output)
when leaving the layer (or entering any other layer) stop recording and do a switch based decision
either the entered keys are a trigger/sequence for a special action - do it.
or they are just normal typing - then just replay the dynamic-macro .
all this can be multied to a normal key and requires no timeouts to trigger.
since I don't use sequences I'm not sure if this could be done in a simpler fashion.
permalink https://github.com/DarkKronicle/nazarick/blob/31a5f623e008a8f1e0be360ecb43c69e3baef46b/modules/home/service/kanata/k65.kbd
2023-10-23 16:22 TODO restart simpler version to achiev Ei Au r e -> ALT + E
2023-10-24 no effect autohotkey espanso maybe effect citrix? powertoys?
BUG hanging ctrl key with AHK and RDP ... now it is mostly hanging Alt. Adding "lctl lctl" to desktop swap makro didn't fix it
HINT: (implemented): DON'T map G-Shift on Mouse to prevent hanging ctrl key
HINT: (implemented): AHK funtionality to swap desktops without pressing ctl currently (multi lmet lalt ß)
idea: deactivate autohotkey (to see if the problem persists) but than desktop cycling won't work
restart script after windows locking
$env:WT_SESSION = "0"
Start-Process -WindowStyle Minimized -UseNewEnvironment -FilePath "wt.exe" -ArgumentList "new-tab", "--startingDirectory", "C:\bin", "--", "C:\bin\kanata.exe", "-dnc", "C:\Users\bogorad\git\.dotfiles\kanata\.config\kanata\kanata.kbd", "-p", "0.0.0.0:5588"
Start-Process -WindowStyle Minimized -UseNewEnvironment -FilePath "wt.exe" -ArgumentList "new-tab", "--startingDirectory", "C:\bin", "--", "C:\bin\vmcli.exe", "Command.Restart=1"
exit
IDEA: TWo uppercase letters will start CAPS word-custom
- the second Caps presse a virtualkey vkshift
- maybe second vk press to handle numbers,...
- vkshift might just be shift => manual shift will still produce upper case
- but not pressing shift simliyfies numbers and layers
- space , ; . : tab enter MODS will break the shift Symbols and Numbers will not
- dash might be (unicode -)
- Numbers also (unicode)
- On switching layers
- first single uppercase letter (vkUpper2 not pressed) -> vkUpper1-PRESS
- anything not uppercase letter -> v-Upperz-Release
- second upper case letter -> vkUpper2 Press
- tracking Uppercase keys - On Uppercase a) shift is pressed ag b) vk1 is pressed
- follow UCASE letter with sldr as does work poorly because the second shift might have happend befors the sequence
- howto avoid it in passwords
***** ALT-Tab Guide **************************
caps-tap = alt-tab x1
caps-hold = WASD alt-tab selection
J/Q = depress ALT to have WASD cursor keys
A/E = ESC to exit dialog
shift caps = S-alt-tab = Cycle though all windows backward (all desktops)? nothing special?
Lspace caps= RDP replace tab with pgup
ctl caps = keep selection screen open
***** CAPS Layer Guide ************************************
caps Layer toggle with numlock indicator = shift + <-Lspace (exit with shift + <-Lspace, AltGr, Numberline or Macrolayer)
numbers and punctuation are not upper case all shifts enable lowercase on letters
Hold symbols are unchanged
***** Autosymbol Guide ***********************************
Autosymbol Repeat: TAP_HOLD x TAP x -> xx d__ d -> // ,___ . -> < >
Autosymbol DBL-tap-Hold: rare usage on , -> < and . -> > / most cases -> symbol autorepeat / j x have no symbol autorepeat / only homerow letters autorepeat
Autosymbol Longhold (reconsider) doubling the symbol
TODO-Usage idea: SHIFT + ,. are never used
TODO-Usage LSPACE + RSPACE = ENTER is never used -> mouse?
****** COMBOS Guide **************************************
TODO F24 + E/I :: AHK desktop cycle not used / don't work consistent input must be super fast
INFO V + Ü = DEL
INFO Ü + Ä = BSPC
INFO Ü+Ä+V = C-BSPC
INFO G + , = ESC
INFO , + . = F24
***** Numberrow / dynamic-macro Guide **********
1-5 dynamic-macro play / 11 on baselayer dp0
6-0 dynamic-macro record
11 dynamic-macro save
12 dynamic-macro save
j=F1,...q*F11,ß=F12
*********************** can it be done with qmk ****************************
;; RETRY via only 4 layers base, numbers-nav, symbols, mouse => no place for a normal kanata or querty layer
;; VIA has 4 layers = base+ , nav , symbol, mouse but plain base is missing => replace symbol-layer by combos
;; FEATURES kanata versus QMK QMK minimal portable requirements
;; - Home row mods (Y) but timing problems Fallback abc layer (Fallback = no kanata available)
;; - Autosymbol: Tap_Hold y TAP_HOLD / MOD_TAP Fallback abc (but not VIA) => Fallback Symbol layer
;; -(Autosymbol: NO Dbl_Tap_Hold on Shift) n also timing issues
;; -(Autosymbol: Dbl_Tap_Hold ONLY for SLOW KEYS q,.) Y for all non modifiers
;; - Autosymbol: Dbl_Tap_Hold on non Shift modifiers N
;; -(Autosymbol: Dbl_Tap slowes Tap_Hold) Y no problem for non modifiers
;; - Autosymbol: Long_Hold N
;; - Symbol layer (rarly used space + caps) y Fallback Symbol layer (with dedicated key)
;; - V-key Symbol layer (not used anymore) (y) is possible but maybe not needed
;; - Nav/Number layer y + sticky + dedicated layerkey Fallback number/nav layer (with SPACE)
;; - Shift fork layer (y) tricky
;; - one-shot layer (rarly used) y
;; - one-shot shift, y
;; - alt tap otimization ? map caps to ALT-Tab or SYSMBOLS
;; - F23 to Ahk Mouse layer y even better also with ahk highlight *Mouse Layer
;; - F24 to Ahk hotkeys y ?
;; - leaderkey, wincompose and ahk integration (y) no leaderkey but integrations still work
;; - AHK hotstring Problems (y) less AHK hotstring
;; - extra thumbkeys can be supported (F13+) extra thumbkeys can be handeled directly (mouse)
;; - F-Keys as normal F-Key layer *F-Key layer
;; - bspc on ö (not used anymore) - on ö or - on , _on =
;; - rdesktop alt-pgup requires interception? pgup can be remapped
;;
;; INFO wich thumb activates nav? cursor keys seems to be used with right tumb on alice
;; BUG SC06F remap altgr to F24 in sharpkeys is not recognized by kanata
;; INFO double leader keying (multi F24 sldr) inconsistencies with sldr
;; INFO sldr key not used
;; TODO-Usage AltGr is a bad positionend key anyway - bspc but not used
;; TODO where to put delete? nav+ö VÜ nav+,
;; INFO rpt just rpeats one key and no mods ... useless (rpt-any also)
;; TODO revisit win and esc optimization / rsft - vs rsft esc / @.rtw vs esc_win
;; INFO ctrl + Z single key ? but no need
;; INFO combine @.tab with esc feels bad
TIP If you want instant activation on a tap-hold you could try do something like: (multi (macro a) (tap-hold $100 $100 xx b))
BUG one shot queueing seems to break after some time - like reloading ahk
BUG AltGr + I = ahk menu seems to hang CTRL - SOLVED by excluding AltGr (and Ctrls) from defsrc (really?)
|#
(defcfg
chords-v2-min-idle 170
process-unmapped-keys yes ;; WHY yes?
;;yes does not help with japanese keys ; did not help with RDP sticky keys;
;;Used since Nov 2023 maybe because of dynamic-macros?!
;;maybe usage of rctl rmet ralt in switch
;;needed for WINIOV2 and WIN to have mouse modifiers (naga)
delegate-to-first-layer yes ;;INFO only for layer-switch; _ to reference to base layer seems correct (TODO simplyfy layers). has no effect on deflayermap.
concurrent-tap-hold yes ;;TODO now yes is working INFO getting early autosymbols if yes eg. Hold-U + Tap-, gives (; instead of (, same for ({ instead of (ü [TODO make a simulation to prove the problem.] problem has gone 1.7.1p
sequence-timeout 3000 ;; sequence not used
sequence-input-mode visible-backspaced ;;hidden-suppressed ;; hidden-delay-type ;; BUG the hidden types sometimes have shift issues
sequence-backtrack-modcancel no ;; unknown
;; windows-interception-mouse-hwid "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0"
;; windows-altgr cancel-lctl-press ;; remove the lctl press that comes as a combo with ralt with F24 mapping
;; windows-altgr add-lctl-release ;; add an lctl release when ralt is released with standard Altgr
;; HINT GH: on windows don't map altgr to avoid both options from above
;; NOTE: even with these workarounds, putting lctl+ralt in your defsrc may
;; not work too well with other applications that use WH_KEYBOARD_LL.
;; Known applications with issues: GWSL/VcXsrv
log-layer-changes yes ;; overhead vs info in console
tray-icon "base.ico" ;; should activate for layers without icons
icon-match-layer-name yes ;;|yes| match layer name to icon files even without an explicit (icon name.ico) config
tooltip-layer-changes no ;;|false|
tooltip-show-blank no ;;|no|
tooltip-duration 500 ;;|500|
tooltip-size 24,24 ;;|24 24|
notify-cfg-reload yes ;;|yes|
notify-cfg-reload-silent yes ;;|no|
notify-error yes ;;|yes|
;; Using a binary compiled with the cmd feature enabled - usecases: current date, NUMLOCK status
danger-enable-cmd yes
rapid-event-delay 5 ;; (5) This configuration applies to
;; a) the release of one-shot-press activation
;; b) the release of the tapped key in a tap-hold activation
;; hw Keychron V10 and K15 Pro (TODO missing laptop keyboard) - keyboard binding prevents layer influences on the mouse
windows-interception-keyboard-hwids (
"72, 0, 73, 0, 68, 0, 92, 0, 86, 0, 73, 0, 68, 0, 95, 0, 51, 0, 52, 0, 51, 0, 52, 0, 38, 0, 80, 0, 73, 0, 68, 0, 95, 0, 48, 0, 51, 0, 65, 0, 49, 0, 38, 0, 82, 0, 69, 0, 86, 0, 95, 0, 48, 0, 49, 0, 48, 0, 50, 0, 38, 0, 77, 0, 73, 0, 95, 0, 48, 0, 48, 0, 0, 0, 72, 0, 73, 0, 68, 0, 92, 0, 86, 0, 73, 0, 68, 0, 95, 0, 51, 0, 52, 0, 51, 0, 52, 0, 38, 0, 80, 0, 73, 0, 68, 0, 95, 0, 48, 0, 51, 0, 65, 0, 49, 0, 38, 0, 77, 0, 73, 0, 95, 0, 48, 0, 48, 0, 0, 0, 72, 0, 73, 0, 68, 0, 92, 0, 86, 0, 73, 0, 68, 0, 95, 0, 51, 0, 52, 0, 51, 0, 52, 0, 38, 0, 85, 0, 80, 0, 58, 0, 48, 0, 48, 0, 48, 0, 49, 0, 95, 0, 85, 0, 58, 0, 48, 0, 48, 0, 48, 0, 54, 0, 0, 0, 72, 0, 73, 0, 68, 0, 95, 0, 68, 0, 69, 0, 86, 0, 73, 0, 67, 0, 69, 0, 95, 0, 83, 0, 89, 0, 83, 0, 84, 0, 69, 0, 77, 0, 95, 0, 75, 0, 69, 0, 89, 0, 66, 0, 79, 0, 65, 0, 82, 0, 68, 0, 0, 0, 72, 0, 73, 0, 68, 0, 95, 0, 68, 0, 69, 0, 86, 0, 73, 0, 67, 0, 69, 0, 95, 0, 85, 0, 80, 0, 58, 0, 48, 0, 48, 0, 48, 0, 49, 0, 95, 0, 85, 0, 58, 0, 48, 0, 48, 0, 48, 0, 54, 0, 0, 0, 72, 0, 73, 0, 68, 0, 95, 0, 68, 0, 69, 0, 86, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0"
"72, 0, 73, 0, 68, 0, 92, 0, 86, 0, 73, 0, 68, 0, 95, 0, 51, 0, 52, 0, 51, 0, 52, 0, 38, 0, 80, 0, 73, 0, 68, 0, 95, 0, 48, 0, 50, 0, 70, 0, 57, 0, 38, 0, 82, 0, 69, 0, 86, 0, 95, 0, 48, 0, 49, 0, 48, 0, 49, 0, 38, 0, 77, 0, 73, 0, 95, 0, 48, 0, 48, 0, 0, 0, 72, 0, 73, 0, 68, 0, 92, 0, 86, 0, 73, 0, 68, 0, 95, 0, 51, 0, 52, 0, 51, 0, 52, 0, 38, 0, 80, 0, 73, 0, 68, 0, 95, 0, 48, 0, 50, 0, 70, 0, 57, 0, 38, 0, 77, 0, 73, 0, 95, 0, 48, 0, 48, 0, 0, 0, 72, 0, 73, 0, 68, 0, 92, 0, 86, 0, 73, 0, 68, 0, 95, 0, 51, 0, 52, 0, 51, 0, 52, 0, 38, 0, 85, 0, 80, 0, 58, 0, 48, 0, 48, 0, 48, 0, 49, 0, 95, 0, 85, 0, 58, 0, 48, 0, 48, 0, 48, 0, 54, 0, 0, 0, 72, 0, 73, 0, 68, 0, 95, 0, 68, 0, 69, 0, 86, 0, 73, 0, 67, 0, 69, 0, 95, 0, 83, 0, 89, 0, 83, 0, 84, 0, 69, 0, 77, 0, 95, 0, 75, 0, 69, 0, 89, 0, 66, 0, 79, 0, 65, 0, 82, 0, 68, 0, 0, 0, 72, 0, 73, 0, 68, 0, 95, 0, 68, 0, 69, 0, 86, 0, 73, 0, 67, 0, 69, 0, 95, 0, 85, 0, 80, 0, 58, 0, 48, 0, 48, 0, 48, 0, 49, 0, 95, 0, 85, 0, 58, 0, 48, 0, 48, 0, 48, 0, 54, 0, 0, 0, 72, 0, 73, 0, 68, 0, 95, 0, 68, 0, 69, 0, 86, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0"
"72, 0, 73, 0, 68, 0, 92, 0, 86, 0, 73, 0, 68, 0, 95, 0, 51, 0, 52, 0, 51, 0, 52, 0, 38, 0, 80, 0, 73, 0, 68, 0, 95, 0, 48, 0, 49, 0, 65, 0, 51, 0, 38, 0, 82, 0, 69, 0, 86, 0, 95, 0, 48, 0, 49, 0, 48, 0, 48, 0, 38, 0, 77, 0, 73, 0, 95, 0, 48, 0, 48, 0, 0, 0, 72, 0, 73, 0, 68, 0, 92, 0, 86, 0, 73, 0, 68, 0, 95, 0, 51, 0, 52, 0, 51, 0, 52, 0, 38, 0, 80, 0, 73, 0, 68, 0, 95, 0, 48, 0, 49, 0, 65, 0, 51, 0, 38, 0, 77, 0, 73, 0, 95, 0, 48, 0, 48, 0, 0, 0, 72, 0, 73, 0, 68, 0, 92, 0, 86, 0, 73, 0, 68, 0, 95, 0, 51, 0, 52, 0, 51, 0, 52, 0, 38, 0, 85, 0, 80, 0, 58, 0, 48, 0, 48, 0, 48, 0, 49, 0, 95, 0, 85, 0, 58, 0, 48, 0, 48, 0, 48, 0, 54, 0, 0, 0, 72, 0, 73, 0, 68, 0, 95, 0, 68, 0, 69, 0, 86, 0, 73, 0, 67, 0, 69, 0, 95, 0, 83, 0, 89, 0, 83, 0, 84, 0, 69, 0, 77, 0, 95, 0, 75, 0, 69, 0, 89, 0, 66, 0, 79, 0, 65, 0, 82, 0, 68, 0, 0, 0, 72, 0, 73, 0, 68, 0, 95, 0, 68, 0, 69, 0, 86, 0, 73, 0, 67, 0, 69, 0, 95, 0, 85, 0, 80, 0, 58, 0, 48, 0, 48, 0, 48, 0, 49, 0, 95, 0, 85, 0, 58, 0, 48, 0, 48, 0, 48, 0, 54, 0, 0, 0, 72, 0, 73, 0, 68, 0, 95, 0, 68, 0, 69, 0, 86,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0"
)
;; This configuration allows you to customize the length limit on dynamic macros. The default limit is 128 keys.
dynamic-macro-max-presses 20
;; dynamic-macro-delay-between-replay-actions customizes the number of ticks
;; (approx 1ms) between each replay action of a dynamic macro. The default
;; value is 5. This may need to be increased if some state changes, e.g. a
;; layer change is not happening at the right time.
;; dynamic-macro-delay-between-replay-actions 5
movemouse-smooth-diagonals yes
movemouse-inherit-accel-state yes ;; not much effect
)
(platform (wintercept)
(defvar
y y ;; INFO wintercept confuses y and z but can be solved with deflocalkeys, vars does not work in defsrc, ( => $z $y can be removed?!)
z z
)
)
(platform (win)
(defvar
y y
z z
;; TODO use variables for rsft rctl to handle non interception RDP cases
)
)
(platform (win winiov2)
(defvar
y z
z y
)
)
(defvar
off nop0 ;; $off used to deactivate template-features
;; timers - this is done to simplyfy adjustment of timing differences on different computers/keyboards
100 100 ;; punctuation
120 120 ;; j!
140 140 ;; 1! " $ ? # % } ; and tap-dance punctuation
145 145
150 150 ;; ( and )
160 160 ;; homerow shift and & \ @ '
180 180 ;; template and ö =
200 200 ;; layers numbers / | { caps-layer
240 240
300 300 ;; homerow ctl
340 340
350 350
400 400
450 450
500 500 ;;==
600 600
700 700
800 800
900 900 ;;===
)
(deflocalkeys-wintercept
- 191
ü 219
+ 221
# 220
ö 186
ß 189
^ 192
´ 187
ä 222
< 226
y 90
z 89
;;- 555 INFO random custom numbers does not work with interception
)
(deflocalkeys-win
- 189
ü 186
+ 187
# 191
ö 192
ß 219
^ 220
´ 221
ä 222
< 226
y 89 ;; ( y and z are flipped compared to wintercept)
z 90
)
;; winiov2 doubles AHK keys in a predictabele manner ::by:: becomes ::bbyy:: BUT it kills modifiers on Mouse
;; winiov2 has problems with C+Y = Ditto on the mouse (naga displays C+Z)
(deflocalkeys-winiov2
- 191
ü 219
+ 221
# 220
ß 189
ö 186
^ 192
´ 187
ä 222
< 188
y 90
z 89
)
(defalias
;; *** numlock on / off indicator for CAPS or other sticky layers *** BUG code must be doubled
;;.nly (cmd-output-keys powershell.exe -NoProfile -NoLogo -NonInteractive "if ($([console]::NumberLock) -match 'True') { echo '()' } else { echo '(nlck)' }")
.nly (cmd AutoHotkey numlockon.ah2)
;;.nln (cmd-output-keys powershell.exe -NoProfile -NoLogo -NonInteractive "if ($([console]::NumberLock) -match 'True') { echo '(nlck)' } else { echo '()' }")
.nln (cmd AutoHotkey numlockoff.ah2)
;; sftoff to deactivate self made DoubleCaps TODO-Usage vs anoying
.sftoff (multi (on-press release-vkey nop1) (on-press release-vkey nop2) (on-press release-vkey sft))
)
(defvirtualkeys
;;nlockon/off is used over .nly/n in while-held scenarios
;;nlockon (cmd-output-keys powershell.exe "if ($([console]::NumberLock) -match 'True') { echo '()' } else { echo '(nlck)' }")
;;nlockoff (cmd-output-keys powershell.exe "if ($([console]::NumberLock) -match 'True') { echo '(nlck)' } else { echo '()' }")
nlockon (cmd AutoHotkey numlockon.ah2)
nlockoff (cmd AutoHotkey numlockoff.ah2)
;;*** NUMBERS/ALT TAB ***
ctl lctl
sft lsft
met lmet
alt lalt
tab tab
;; *** DoubleCaps ***
caps caps ;; unused
nop1 nop1 ;; pressed if last letter was Upper Case
nop2 nop2 ;; pressed if vkey sft is also pressed to be used in fork not needed if (switch ((input virtual sft)) is used instead
on-idle-action (macro-release-cancel 5000 (on-press release-vkey nop1) (on-press release-vkey nop2) (on-press release-vkey sft))
;; misc
mouselight M-S-f
to-base (layer-switch base)
vcaps (layer-while-held CAPS)
)
;; TODO-Usage E-i -> spc E-s -> End E-c -> Home
(deftemplate same-side-lshift (defaultaction trigger action)
(switch
(rsft lctl rctl ralt lalt lmet rmet) $defaultaction break ;; lshift is missing from the list
($trigger) $action break
() $defaultaction break
)
)
(deftemplate capscount (keytap)
(switch
;;0. clear idle timer
() (on-press release-vkey on-idle-action) fallthrough
;; 1. press key and reset deactivation timer
() (fork $keytap (multi lsft $keytap (on-press press-vkey on-idle-action)) (nop2)) fallthrough ;;reverse-release-order TODO nop2 fork only relevant when not using vkey sft
;; 1.0.1 cancel if another key was pressed or to much time has passed
((and nop1 (not(or
(and (key-history nop1 1 ) (key-timing 1 less-than 500 ))
(and (key-history nop1 2 ) (key-timing 2 less-than 500 ))
(and (key-history nop1 3 ) (key-timing 3 less-than 800 ))
)))) (multi (on-press release-vkey nop1)) break
;; 3. activate sft, remember it by nop2, set deactivation timer
((and nop1 lsft)(and nop1 rsft)) (multi
(on-press press-vkey sft)
(on-press press-vkey nop2)
(on-press press-vkey on-idle-action)
) break
;; 2. remember a uppercase was used
((and (or lsft rsft) (not nop1 nop2))) (on-press press-vkey nop1) break ;;comment this line to deactivate DOubleCAps
;; 1.1 else forget about it
() (on-press release-vkey nop1) break
)
)
;;****** key-hold-repeat INFO base concept ***********************************************************
;;**** re-tapping a key will repeat the last output produced by this key (wether tap or hold) ****
;;**** historykeys resambles keyrepeat broken up into all its individual keystrokes/modifiers ****
(deftemplate key-hold-repeat (timehold time2ndhold keytap keyhold keyrepeat historykey3 historykey2 modlesshistorykey1 combokeylist comboout)
;; sam v| (t! key-hold-repeat $200 $800 v @.| @.| XX ralt < (ü 7) del )
;; TODO using RA- ralt may only work with "process-unmapped-keys yes" and wintercept
;; $historykey3 is currently used to disabel symbol repeat for </div TODO should then be a list
;; j! x` b= g* ,;< .:> -_~ and homrow mods have there own implementation
;; TIP this template can be wraped in (multi ... @.tp) But for some scenarios (non windtercept / no powertoys / windows 11 ) may require calling @.tp from inside this template
;; TODO is input-history better than key-history? most likely not because we care most about output-keys
;; TODO is there a reason to replace tap-dance-eager with switch?
(tap-dance-eager $150 (
(tap-hold 1 $timehold
;; I.a first tap of TAP-DANCE holding and then retapping will repeat the hold action (not the long-hold)
(switch
;;0. clear idle timer
;;() (on-press release-vkey on-idle-action) fallthrough
(if-not-equal $historykey2 XX
;; $historykey3 prevents symbol repeat for </div </d // /d
(if-not-equal $historykey3 XX (
(and (key-history $modlesshistorykey1 1)(key-history $historykey2 2)(key-history $historykey3 3))
) $keytap break )
(if-not-equal $historykey3 XX (
(and (key-history $modlesshistorykey1 1)(key-history $historykey2 2))
) $keyhold break )
(if-equal $historykey3 XX ((and (key-history $modlesshistorykey1 1)(key-history $historykey2 2))
) $keyhold break )
)
(if-equal $historykey2 XX
((key-history $modlesshistorykey1 1)) $keyhold break
)
() $keytap break
;; 1. press key and reset deactivation timer
;;() (fork $keytap (multi lsft $keytap (on-press press-vkey on-idle-action)) (nop2)) fallthrough ;;reverse-release-order TODO nop2 fork only relevant when not using vkey sft
;; 1.0.1 cancel if another key was pressed or to much time has passed
;;((and nop1 (not(or
;;(and (key-history nop1 1 ) (key-timing 1 less-than 500 ))
;;(and (key-history nop1 2 ) (key-timing 2 less-than 500 ))
;;(and (key-history nop1 3 ) (key-timing 3 less-than 800 ))
;;)))) (multi (on-press release-vkey nop1)) break
;; 3. activate sft, remember it by nop2, set deactivation timer
;;((and nop1 lsft)(and nop1 rsft)) (multi
;; (on-press press-vkey sft)
;; (on-press press-vkey nop2)
;; (on-press press-vkey on-idle-action)
;; ) break
;; 2. remember a uppercase was used
;;((and (or lsft rsft) (not nop1 nop2))) (on-press press-vkey nop1) break ;;comment this line to deactivate DOubleCAps
;; 1.1 else forget about it
;;() (on-press release-vkey nop1) break
)
;; I.b hold of first tap of TAP-DANCE - manual Shift overwrites hold / no autorepeat / long-hold for (), {},...
(switch
;;DISABLED pass combokeylist ($off) XX to disable combo feature. The real combo must be build with chords, this is just for fixing misstiming the combo. Is this even usefull?
;;DISABLED (if-not-in-list $off ($combokeylist) $combokeylist $comboout break) ;; held with misstimed chords v + ü = del
(rsft lsft) (macro $keytap) break ;; Shift Prefer / Shift protection - shifting will disable the hold feature TODO this will not work fine with ctrl+sft+#
() (multi
(macro $keyhold )
(tap-hold $180 $time2ndhold XX
;; TODO we could cancel this by taping a vkey that checks key-history 1 = keyhold
(if-not-equal $keyrepeat XX (macro $keyrepeat )) ;;INFO (), {},... keyrepeat cannot be a macro itself
(if-equal $keyrepeat XX XX)
)
) break
;;BUG I.b.2 LONG hold - macro-release-cancel wont cancel only if keyhold=keyrepeat
;;() (if-not-equal $keyrepeat XX (macro-cancel-on-press $keyhold $time2ndhold $keyrepeat))
;; (if-equal $keyrepeat XX (macro-cancel-on-press $keyhold ))
;; break
)
)
;; II. second tap of TAP-DANCE
(tap-hold 1 $timehold
;; II.a this is identical to I.a
(switch
;;0. clear idle timer
;;() (on-press release-vkey on-idle-action) fallthrough
(if-not-equal $historykey2 XX
;; $historykey3 prevents symbol repeat for </div </d // /d
(if-not-equal $historykey3 XX (
(and (key-history $modlesshistorykey1 1)(key-history $historykey2 2)(key-history $historykey3 3))
) $keytap break )
(if-not-equal $historykey3 XX (
(and (key-history $modlesshistorykey1 1)(key-history $historykey2 2))
) $keyhold break )
(if-equal $historykey3 XX ((and (key-history $modlesshistorykey1 1)(key-history $historykey2 2))
) $keyhold break )
)
(if-equal $historykey2 XX
((key-history $modlesshistorykey1 1)) $keyhold break
)
() $keytap break
;; 1. press key and reset deactivation timer
;;() (fork $keytap (multi lsft $keytap (on-press press-vkey on-idle-action)) (nop2)) fallthrough ;;reverse-release-order TODO nop2 fork only relevant when not using vkey sft
;; 1.0.1 cancel if another key was pressed or to much time has passed
;;((and nop1 (not(or
;;(and (key-history nop1 1 ) (key-timing 1 less-than 500 ))
;;(and (key-history nop1 2 ) (key-timing 2 less-than 500 ))
;;(and (key-history nop1 3 ) (key-timing 3 less-than 800 ))
;;)))) (multi (on-press release-vkey nop1)) break
;; 3. activate sft, remember it by nop2, set deactivation timer
;;((and nop1 lsft)(and nop1 rsft)) (multi
;; (on-press press-vkey sft)
;; (on-press press-vkey nop2)
;; (on-press press-vkey on-idle-action)
;; ) break
;; 2. remember a uppercase was used
;;((and (or lsft rsft) (not nop1 nop2))) (on-press press-vkey nop1) break ;;comment this line to deactivate DOubleCAps
;; 1.1 else forget about it
;;() (on-press release-vkey nop1) break
)
;; II.b no need for manual Shift protection / autorepeat enabled
(switch
;;DISABLED (if-not-in-list $off ($combokeylist) $combokeylist $comboout break)
;; !!! here is the difference to tap-dance one !!!
((key-history $modlesshistorykey1 1)) $keyhold break ;; add double-tap-hold
((key-history $keytap 1)) (macro (unmod bspc) (unmod bspc)) fallthrough ;; double bspc has no explanation but is needed (including unmod)
((key-history $keytap 1)) $keyhold break
() (multi
(macro $keyhold )
(tap-hold $180 $time2ndhold XX ;;must $180 be a parameter?
(if-not-equal $keyrepeat XX (macro $keyrepeat )) ;;to do (), {},... keyrepeat cannot be a macro itself
(if-equal $keyrepeat XX XX)
)
) break
)
)
;; TODO? add a third tap-dance for autorepeat letters / special or game layer might be better because all keys can be auto repeated
))
)
(defalias
.dsk (multi lmet lalt ß) ;; AHK desktop switch must use MODS to be active within RDP SYMBOL+M
.CAPSon (multi (on-press toggle-vkey vcaps) @.nly) ;;using toggle to be more error redundant
.CAPSoff (multi (on-press release-vkey vcaps) @.nln)
;; *** LAYER-TOGGLE & SWITCH-LAYER(STICKYNESS) ***
.num (layer-while-held numbers)
.numtab (layer-while-held numberstab)
.sym (layer-while-held symbols)
.syv (one-shot 2000 (layer-while-held vsymbols))
.syvv (layer-while-held vsymbols)
.sy1 (one-shot 2000 (layer-while-held symbols))
.fky (layer-while-held fkeymacro)
.basen (multi (layer-switch base) @.nln)
.base (layer-while-held base)
.numfix (multi (layer-switch numfix) @.nly)
;; *** CAPS WORDS *** ONLY used on non base layer TODO-Usage
;; .cwd (caps-word-custom 2000
;; (a b c d e f g h i j k l m n o p q r s t u v w x y z ä ü ö)
;; (1 2 3 bspc del up down left rght rsft -) ;; rsft must be exluded as they are used for triggering caps words
;; )
.cwl (caps-word-custom 2000
(a b c d e f g h i j k l m n o p q r s t u v w x y z ä ü ö)
(1 2 3 bspc del up down left rght lsft -) ;; lsft must be exluded as they are used for triggering caps words
)
;; *** LEFT_Spacebar = F14 : RETURN *** SYMBOLS *** LEFT_Shift + LEFT_Spacebar_hold == numbers ; Shift + LEFT_Spacebar_tap == CAPS-layer ***
.ff14 (tap-hold $200 $200
(switch
(nop1 nop2) (unmod (lsft) ret) fallthrough
(nop1 nop2) @.sftoff break
(rsft lsft) @.CAPSon break
() ret break
)
(fork
(multi
nop3 ;; break keyhistory
(layer-while-held numbers)
(tap-hold-press-timeout 0 1100 ;; we have to use press to not cancel holding a key
(layer-while-held symbols)
(layer-while-held symbols) (layer-while-held numbers)
)
)
(layer-while-held numbers)
(lsft)
)
)
;; *** LEFT_Spacebar on CAPS-layer
.ff14c (tap-hold $200 $200
(fork ret @.CAPSoff (rsft lsft))
(fork
(multi (layer-while-held numbers) (layer-while-held symbols))
(layer-while-held numbers)
(lsft)
)
)
;; *** Numberline(unused) + dynamic-macro ***
.ff15 (tap-hold 1 $200 (multi @.nly (layer-switch numberline)) (multi (layer-while-held numberline) (on-press tap-vkey nlockon) (on-release tap-vkey nlockoff) )) ;; no numlock warning when using keypad numbers possible
.ff15c (tap-hold 1 $200 @.CAPSoff (layer-while-held numberline))
;; *** MACRO + F-Keys layer *** TIP removing one-shot solves problems with hitting the key by accident
.ff13
(tap-hold $200 $200
(multi
(on-press release-vkey vcaps )
(on-press release-vkey caps )
(on-press release-vkey sft )
(on-press release-vkey nop1 )
(on-press release-vkey nop2 )
(on-press release-vkey on-idle-action)
(layer-switch base)
@.nln
(release-key lctl)
(release-key rctl)
(release-key lsft)
(release-key rsft)
(release-key lalt)
(release-key ralt)
(release-key lmet)
(release-key rmet)
)
(multi
F21 ;; F21 is not used in ahk it just consumes a key press TODO why?
(on-press release-vkey vcaps )
(on-press release-vkey caps )
(on-press release-vkey sft )
(on-press release-vkey nop1 )
(on-press release-vkey nop2 )
(on-press release-vkey on-idle-action)
(layer-switch base)
@.nln
(layer-while-held fkeymacro)
)
)
.nav (tap-hold $200 $200
(fork spc (multi spc @.sftoff) (nop1 nop2))
(fork (multi nop3 @.num @.sftoff) (multi @.num @.sym @.sftoff) (rsft))) ;; RIGHT sft + RIGHT spc == symbols ; nop1 signals layer switch
.nav-typing (tap-hold $200 $200 (multi @.basen spc) (fork @.num @.sym (rsft)))
;; *** ONE SHOT MODIFIERS ***
.oss (tap-hold $200 $300 @.cwl lsft) ;; use caps words on non base layer
.cabs (tap-hold $200 $300 @.CAPSon lsft)
.scabs (tap-hold $200 $300 @.CAPSoff lsft) ;; inverted Shift for cabs layer
.osss (one-shot 2000 lsft)
;;.ocl (one-shot 2000 lctl)
.oal lalt ;; not used but causes trouble when hit by accident (one-shot 2000 lalt)
.oml (one-shot 2000 lmet) ;; TODO-Usage
;; disalble tap-hold keys if typing rapidly but reenable after a shord idle period
.tp (multi
;;(layer-switch typing) ;; one-shot fixes Tte into TE
(one-shot 95 (layer-while-held typing))
(on-idle 95 tap-vkey to-base )
)
.tpe (multi
(one-shot $145 lsft)
;;(layer-switch typing)
;;(on-idle 95 tap-vkey to-base )
)
;; modded german key aliases
.' S-#
.+ +
.* S-+
._ S--
.~ (unicode ~) ;;RA-+ ;;(multi lctl ralt +)
.| RA-102d
.} RA-0 ;; TIP/BUG C-A- works with rdp but not in windows terminal C-A- 7 8 9 0 shortcuts must be deleted
.{ RA-0 ;; (multi lctl ralt 7)
.] RA-9
.[ RA-8
.\ RA-ß ;;(unicode \) INFO has been better in some environments in the past
.ẞ RA-S-ß
.€ (unicode r#"€"# ) ;; (macro RA-e )
.@ RA-q ;; INFO (unicode @ ) will mess up keyhistory but may be better on non wintercept
.² RA-2
.³ RA-3
.µ RA-m
.! S-1
.˝ S-2 ;; ˝ look-a-like is used because @." is no valid alias, to be displayed correctly in console requires a font that can - e.g. cascadia
.§ S-3
.$ S-4
.% S-5
.& S-6
./ S-7
.◖ S-8 ;; ◖ look-a-like is used because @.( is no valid alias, to be displayed correctly in console requires a font that can - e.g. cascadia
.◗ S-9 ;; ◗ look-a-like is used because @.) is no valid alias, to be displayed correctly in console requires a font that can - e.g. cascadia
.= S-0
.? S-ß
.; (macro S-, )
.: (macro S-. )
.> S-102d
.< 102d ;; not really needed because < is a deflocalkey but having @.< and @.> looks consistent
;; **** dead keys to normal keys ****
.´ (macro = spc)
.` (macro S-´ spc)
.^ (unicode ^) ;; ^ = \ - shifting (macro grv spc) will produce an incorrect space now: "° " TODO unicode may prevent shortcuts
.° (macro S-grv)
;;.F20 (macro F20) ;; ahk unused
;;.F19 (macro F19) ;; ahk unused
;;.ä (macro ')
;;.ü (macro [)
;;.ö (macro ;)
;; mouse buttons
.🖰l mlft ;;M-C-A-f ;; using AHK to do the click
.🖰r mrgt ;;M-C-A-d
.🖰m mmid ;;M-C-A-s
;; outer/special keys
..tab (tap-hold-press $200 $800 tab lctl )
.tab (fork @..tab (multi @.sftoff @..tab) (nop1 nop2)) ;; TODO-Usage is ctl ever used?
.rtc (tap-hold-release $200 5000 ret lctl) ;; done with QMk
.ret (multi @.sftoff ret) ;; BUG QMK might still do ctl+sft but is minor
.rtw del ;; TODO find a use for this key
.rsd (tap-hold-release $200 $240 @.syv (multi rsft lsft)) ;; TODO not used ?! BUG rsft get ignored on RDesktop -> use lsft or (multi rsft lsft) ?
.ral S-C-M-A-9 ;; release ALL key (BUG) kanata cannot release stuck keys from ahk (both tools with elevated rights) PRESS F24 FOR RELEASE ALL MODS
;; *** AUTOSHIFT in number row ***
;;ech (tap-hold $140 $400 esc (multi (macro home ) (tap-hold $400 $900 XX (macro end ) )) ) ;; not used
;;^ec (tap-hold $200 $300 esc @.^) ;; TODO not used replaced by esc. a relict of 40% boards (fkeys/numberline)
;; INFO number rom with autorepeat
.^0 (tap-hold $400 $300 (fork 0 (unshift 0) (nop2)) (fork @.^ @.° (lsft rsft)))
.1 (tap-hold $400 $500 (fork 1 (unshift 1) (nop2)) (macro S-1 ))
.2 (tap-hold $400 $300 (fork 2 (unshift 2) (nop2)) (multi @.˝ (tap-hold $200 $700 XX @.˝ )) )
.3 (tap-hold $400 $300 (fork 3 (unshift 3) (nop2)) (macro S-3 ))
.4 (tap-hold $400 $500 (fork 4 (unshift 4) (nop2)) (macro S-4 ))
.5 (tap-hold $400 $500 (fork 5 (unshift 5) (nop2)) (macro S-5 ))
.6 (tap-hold $400 $500 (fork 6 (unshift 6) (nop2)) (macro S-6 ))
.7 (tap-hold $400 $500 (fork 7 (unshift 7) (nop2)) (macro S-7 ))
.8 (tap-hold $400 $500 (fork 8 (unshift 8) (nop2)) (macro S-8 ))
.9 (tap-hold $400 $500 (fork 9 (unshift 9) (nop2)) (macro S-9 ))
.0 0
;; *** number aliases for use inside macros ***
.n1 1
.n2 2
.n3 3
.n4 4
.n5 5
.n6 6
.n7 7
.n8 8
.n9 9
.n0 0
;; *** keypad/homerow mod aliases uses in layer numberline *** TODO NUMLOCK must be enforced
.k1 (tap-hold $200 $500 Numpad1 lmet)
.k2 (tap-hold $200 $500 Numpad2 lalt)
.k3 (tap-hold $200 $500 Numpad3 lctl)
.k4 (tap-hold $200 $500 Numpad4 lsft)
.k5 (tap-hold $200 $500 Numpad5 lmet)
.k6 (tap-hold $200 $500 Numpad6 lmet)
.k7 (tap-hold $200 $500 Numpad7 lsft)
.k8 (tap-hold $200 $500 Numpad8 lctl)
.k9 (tap-hold $200 $500 Numpad9 lalt)
.k0 (tap-hold $200 $500 Numpad0 lmet)
;; *** dynamic-macro TODO use them ***
.dr1 (dynamic-macro-record 1)
.dr2 (dynamic-macro-record 2)
.dr3 (dynamic-macro-record 3)
.dr4 (dynamic-macro-record 4)
.dr5 (dynamic-macro-record 5)
.dp1 (dynamic-macro-play 1)
.dp2 (dynamic-macro-play 2)
.dp3 (dynamic-macro-play 3)
.dp4 (dynamic-macro-play 4)
.dp5 (dynamic-macro-play 5)
.dms dynamic-macro-record-stop
.dst (dynamic-macro-record-stop-truncate 1)
;; *** HOME ROW MODS ***
;; BUG t (tap-hold 1 $160 (multi t @.tp) (multi rsft (tap-hold 1 $900 XX (layer-while-held notp))) ) ;; rsft ,rctl have RDP problems without interception
;; TODO try to use tap-hold-except-keys instead
;; INFO e and t have special treatment for fast typing layer TODO-Usage .tpe what does it fix? EH ET ER
.e] (tap-hold 1 $180 (fork e (multi e nop7 @.tpe) (rsft)) (fork (multi nop6 lsft) (multi @.sftoff nop6 lsft) (nop2)) ) ;;(tap-hold 1 $160 (multi @.tp e) lsft ) ;; (outdated BUG) als erstes muss der Wechsel nach typing erfolgen sonst EIn
;;.t/ (tap-hold 1 $160 (multi t @.tp) (fork rsft (multi @.sftoff rsft) (nop2)) ) ;; rsft ,rctl have RDP problems without interception
.t/ (tap-hold 1 $160 (multi t @.tp)
(switch
((input virtual sft)) @.sftoff fallthrough
() rsft break
)
) ;; rsft ,rctl have RDP problems without interception
..e] (tap-hold 1 $160 e lsft ) ;; als erstes muss der Wechsel nach typing erfolgen sonst EIn
..t (tap-hold 1 $160 t rsft ) ;; rsft ,rctl have RDP problems without interception
.i[ (multi (tap-hold 1 $300 (fork (fork i spc (nop6)) (unicode i) (nop7)) (multi @.base lctl) ) @.tp) ;; BUG unshift in stead of unicode leads to strange errors TODO-Usage lsft + i = space
..i[ (tap-hold $500 $500 i lctl )
..[ (tap-hold $500 $500 @.[ lctl ) ;; used on symbol layer
..- (tap-hold $500 $500 - lctl )
..n (tap-hold $500 $500 n rctl )
.n- (multi (tap-hold 1 $300 n (multi @.base rctl) ) @.tp)
;; Bug in no interception rctl+y to start ditto, then ditto will not act on keyboard input
;; also RDP ignores rctl and rsft but adding to defsrc will not solve the issue
.s^⎇ (tap-hold 1000 1000 (t! same-side-lshift (multi s @.tp) nop6 (unmod end) ) (multi @.base alt)) ;; must multi tp be the first action?
.s⎇ (tap-hold 1000 1000 s alt)
.h⌘ (tap-hold $350 1000 h lmet)
.c⌘ (tap-hold 1000 1000 (t! same-side-lshift c nop6 (unmod home)) lmet)
.r_⎇ (multi (tap-hold-release $450 1000 r (multi @.base lalt)) @.tp)
.rsf (tap-hold-release $350 $500 - rsft)
.rsfb (tap-hold-release $350 $500 - (multi rsft (layer-while-held notp)))
;; chords
_g (chord fkomma g) ;; F24
_, (chord fkomma ko)
_. (chord fkomma .) ;; Q alternative
_v| (chord vüä v) ;; sticky numbers
_ä} (chord vüä ä)
_ü{ (chord vüä ü)
_V| (chord VÜÄ v) ;; sticky numbers
_Ä} (chord VÜÄ ä)
_Ü{ (chord VÜÄ ü)
_7 (chord exit79 7) ;; exit numbers
_8 (chord exit79 8)
_9 (tap-hold 1 $200 (chord exit79 9) @.basen)
_| (chord |} <) ;; mods will be added later in defchord < is | 0 is }
_} (tap-hold 1 $200 (chord |} 0) (release-layer symbols)) ;; tap-hold to exit layer
..] (tap-hold 1 $200 @.] (release-layer symbols)) ;; Go bach to number layer TODO remember this
_z˝ (chord zu $z)
_u◖ (chord zu u)
;; test keys
ff# (t! capscount f)
ll? (t! capscount l)
;; normal keys
.j! (tap-hold 1 $120
(switch
((and (key-history ralt 2)(key-history q 1))) @.@ break
((and (key-history lsft 2)(key-history 1 1))) (macro @.!) break
() j break ;; * with long autorepeat - there must be a macro (@.*) after the multi for the timeout do work
)
(multi (macro @.!) (tap-hold $200 $800 XX (macro bspc @.@ )))
)
..z˝ (t! key-hold-repeat $140 $400 $z @.˝ @.˝ XX lsft 2 ($off) XX)
.z˝tp (multi @..z˝ @.tp)
..u◖ (t! key-hold-repeat $150 $400 u @.◖ @.◗ XX lsft 8 ($off) XX) ;; ( ()
;; TIP a◗ (multi (tap-hold 1 $150 a S-9) @.tp) this order works with powertoys but causes problems with RDP ua vs au
;; TIP a◗ LONG HOLD with no Powertoys running (tap-hold 1 $150 (multi a @.tp) (fork (macro-release-cancel S-9 $600 bspc RA-9 ) C-a (lctl rctl)) ) ;; ) [ todo find a better use
..a◗ (t! key-hold-repeat $150 $800 a @.◗ XX XX lsft 9 ($off) XX)
.a◗ (fork (multi @..a◗ @.tp) (macro a 10 c) (lctl rctl)) ;; do automatic copy C-(ac) after C-a
.y$ (t! key-hold-repeat $140 $800 $y @.$ @.$ XX lsft 4 ($off) XX)
..p& (t! key-hold-repeat $160 $800 p @.& @.& XX lsft 6 ($off) XX) ;; & TODO is switching @.tp position relevante for RDP or Powertoys
.p& (multi @..p& @.tp)
.l? (multi (t! key-hold-repeat $140 $800 l @.? @.? XX lsft ß ($off) XX) @.tp) ;; ? = S-ß = S-[ i ? ??
.m\ (multi (t! key-hold-repeat $160 $800 m @.\ @.\ XX ralt ß ($off) XX) @.tp)
.ß (macro (unshift ß))
.k (macro k)
..f# (t! key-hold-repeat $140 $800 f # XX XX XX # ($off) XX)
.f# (multi @..f# @.tp)
.w% (t! key-hold-repeat $140 $800 w @.% @.% XX lsft 5 ($off) XX)
.q@ (t! key-hold-repeat $160 $800 q RA-q XX XX ralt q ($off) XX)
.o' (t! key-hold-repeat $160 $800 o S-# S-# XX lsft # ($off) XX)
.d/ (t! key-hold-repeat $200 $800 d S-7 S-7 < lsft 7 ($off) XX)
.v| (t! key-hold-repeat $200 $800 v @.| @.| XX ralt < ($off) XX)
.x` (tap-hold 1 160 ;; tap=x or hold=` or long=``` hold+tap...=`````` INFO no autorepeat
(switch
((and (key-history nop5 1)(key-history ´ 3)(key-history spc 2))) (multi lsft ´ spc nop5) break
() x break
)
(fork (multi lsft ´ spc nop5 (tap-hold $200 $800 XX (multi (unicode ` ) (unicode ` )))) (macro S-x) (lsft rsft))
)
.ü{ (t! key-hold-repeat $200 $500 ü RA-7 RA-0 XX ralt 7 ($off) XX) ;; { {}
;;INFO ä} (tap-hold-release-timeout $200 $400 ä @.syvv @.} ) ;; layer activation if ä is comboed; not needed on V10 bc of second space bar
.ä} (t! key-hold-repeat $140 $800 ä RA-0 XX XX ralt 0 ($off) XX) ;; der v XX scheint überflüssig zu sein
.ö+ (t! key-hold-repeat $180 $800 ö + + XX XX + ($off) XX)
.b=== (tap-hold 1 $180 b (macro-release-cancel @.= $500 @.= $900 @.=))
.b= (switch ;; b = == === hold+hold= autorepeat =======
((and (key-history lsft 6) (key-history 0 5) (key-history lsft 4) (key-history 0 3) (key-history lsft 2) (key-history 0 1) )) b break
((and (key-history lsft 2)(key-history 0 1))) @.= break
() @.b=== break
)
_g* (switch ;; g hold=* long=autorepeat
;;((input virtual forkme)) , break ;; TODO does nothing
((and (key-history lsft 3)(key-history + 2)(key-history . 1))) S-+ break
((and (key-history lsft 2)(key-history + 1))) S-+ break
() (tap-hold 1 $160 @_g (multi (macro S-+ ) (tap-hold 1 $800 XX S-+ ))) break ;; there must be a macro (@.*) after the multi for the timeout do work
)
;; TODO layer-toggle shoud break key-history - implemented in @nav by multi nop3
,;< (tap-hold 1 $140 (tap-dance $140 (
(switch
((input virtual nop2)) (on-press release-vkey nop1) fallthrough
((input virtual nop2)) (on-press release-vkey sft) fallthrough
((input virtual nop2)) (release-key lsft) fallthrough
((input virtual nop2)) , fallthrough ;;BUG unmod unshift don't work
((input virtual nop2)) @.sftoff break
((and (key-history lsft 2)(key-history , 1))) S-, break
((and (or (key-history lsft 2)(key-history rsft 2)(key-history lalt 2)(key-history ralt 2)) (key-history 102d 1))) @_, break
((key-history 102d 1)) @.< break
() @_, break
)
(tap-hold 10 $100 (switch
((and (key-history lsft 2)(key-history , 1))) (macro S-, S-,) break
((key-history 102d 1)) (macro @.< @.<) break
() (macro , ,) break
)
(macro @.<) ;; double-tap-hold <
)
)
)
;; hold
(switch
((and (key-history lsft 2)(key-history , 1))) S-, break ;; hold hold ; ;;;;;
((key-history 102d 1)) @.< break ;;??? hold < <<<<<
((and (key-history , 2)(key-history , 1))) , break ;; tap hold , ,,,,, (autorepeat)
() (multi @.; (tap-hold $200 $800 XX (macro bspc @.< ))) break ;; Long_Hold
)
)
.:> (tap-hold 1 $100 (tap-dance $140 (
(switch
((and (key-history lsft 2)(key-history . 1))) S-. break
((and (or (key-history lalt 2)(key-history ralt 2)) (key-history 102d 1))) @_. break
((and (key-history lsft 2)(key-history 102d 1))) @.> break
((and (key-history 102d 1))) @.> break
((and (key-history - 1))) @.> break
() @_. break
)
(tap-hold 10 $100 (switch ;; double-tap-hold = > tripple-tap-hold = .......
((and (key-history lsft 2)(key-history . 1))) (macro S-. S-.) break
((key-history 102d 1)) (macro @.> @.>) break
() (macro . .) break
)
(macro @.>)
)
))
(switch
((and (key-history lsft 2)(key-history . 1))) S-. break ;; hold hold : :::::
((and (key-history lsft 2)(key-history 102d 1))) @.> break ;;??? hold > >>>>>
((key-history . 1)) . break ;; . .....
((key-history - 1)) @.> break ;; -> with hold >
() (multi @.: (tap-hold $200 $800 XX (macro bspc @.> ))) break ;; Long_Hold
)
)
-_~old (tap-hold 1 $100 ;; slash/ is dash- ~ is RA-+ TODO no double-tap-hold is that consistent?
(switch
((and (key-history ralt 2)(key-history + 1))) @.~ break
((and (key-history lsft 2)(key-history / 1))) S-/ break
() / break
)
(switch
((and (key-history ralt 2)(key-history + 1))) @.~ break
((and (key-history lsft 2)(key-history / 1))) S-/ break
((key-history / 1)) / break ;; order after S-/
() (multi (macro @._) (tap-hold $200 $800 XX (macro bspc @.~ ))) break
)
)
-_~ (tap-hold 1 $100 (tap-dance $140 ( ;; slash/ is dash- ~ is RA-+
;; 1. tap
(switch
((and (key-history lsft 2)(key-history / 1))) S-/ break
((and (or (key-history lalt 2)(key-history ralt 2)) (key-history + 1))) @.~ break
((and (key-history lsft 2)(key-history / 1))) S-/ break
() / break
)
;; 2. tap
(tap-hold 10 $100 (switch ;; double-tap-hold is ~ tripple-tap-hold is --- ---
((and (key-history lsft 2)(key-history / 1))) (macro S-/ S-/ ) break
((and (or (key-history lalt 2)(key-history ralt 2))(key-history + 1))) (macro @.~ @.~ ) break
() (macro / / ) break
)
(macro @.~)
)
;; 3. tap
(tap-hold 10 $100 (switch ;; double-tap-hold is ~ tripple-tap-hold is --- ---
((and (key-history lsft 2)(key-history / 1))) (macro S-/ S-/ S-/ ) break
((and (or (key-history lalt 2)(key-history ralt 2))(key-history + 1))) (macro @.~ @.~ @.~) break