-
Notifications
You must be signed in to change notification settings - Fork 257
Expand file tree
/
Copy pathhome-row-mod-prior-idle.kbd
More file actions
52 lines (47 loc) · 1.71 KB
/
home-row-mod-prior-idle.kbd
File metadata and controls
52 lines (47 loc) · 1.71 KB
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
;; Home row mods with tap-hold-require-prior-idle.
;;
;; This replaces the layer-switching workaround in home-row-mod-advanced.kbd
;; with two native features:
;;
;; tap-hold-require-prior-idle — during fast typing, tap-hold keys resolve as tap
;; immediately (no waiting state, no accidental holds)
;;
;; tap-hold-opposite-hand — hold activates only when the next key is on
;; the opposite hand; same-hand rolls always tap
;;
;; The result: no nomods layer, no fakekeys, no multi wrappers.
;;
;; Configuration guide:
;; https://github.com/jtroo/kanata/blob/main/docs/config.adoc#tap-hold-require-prior-idle
;; https://github.com/jtroo/kanata/blob/main/docs/config.adoc#tap-hold
(defcfg
process-unmapped-keys yes
;; If any key was pressed within 150ms, resolve tap-hold as tap immediately.
;; Prevents accidental modifier activation during fast typing.
tap-hold-require-prior-idle 150
)
(defsrc
a s d f j k l ;
)
;; Declare which keys belong to each hand.
;; tap-hold-opposite-hand uses this to decide hold vs tap.
(defhands
(left q w e r t a s d f g z x c v b)
(right y u i o p h j k l ; n m , . /)
)
(deflayer base
@a @s @d @f @j @k @l @;
)
(defalias
;; Note: consider using different time values for your different fingers.
;; For example, your pinkies might be slower to release keys and index
;; fingers faster.
a (tap-hold-opposite-hand 150 a lmet)
s (tap-hold-opposite-hand 150 s lalt)
d (tap-hold-opposite-hand 150 d lctl)
f (tap-hold-opposite-hand 150 f lsft)
j (tap-hold-opposite-hand 150 j rsft)
k (tap-hold-opposite-hand 150 k rctl)
l (tap-hold-opposite-hand 150 l ralt)
; (tap-hold-opposite-hand 150 ; rmet)
)