;; Kanata configuration for MacBook Air M2 with advanced home row modifiers ;; Uses tap-hold-release-keys with bilateral combinations for better accuracy (defcfg process-unmapped-keys yes ;; Adjust these paths based on your system ;; macOS typically uses something like this: ;; linux-dev /dev/input/by-path/your-keyboard-path ;; For macOS, you might need to specify the input device differently ) (defsrc esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 grv 1 2 3 4 5 6 7 8 9 0 - = bspc tab q w e r t y u i o p [ ] \ caps a s d f g h j k l ; ' ret lsft z x c v b n m , . / rsft fn lctl lalt lmet spc rmet ralt left down up rght ) (defvar ;; Timing values - adjust based on your typing speed tap-time 200 hold-time 150 ;; Define which keys are on each hand for bilateral combinations left-hand-keys (q w e r t a s d f g z x c v b) right-hand-keys (y u i o p h j k l ; n m , . /) ) ;; Base layer with home row modifiers and proper media keys (deflayer base esc brdn brup mctl @spotlight f5 f6 prev pp next mute vold volu grv 1 2 3 4 5 6 7 8 9 0 - = bspc tab q w e r t y u i o p [ ] \ caps @a @s @d @f g h @j @k @l @; ' ret lsft z x c v b n m , . / rsft fn lctl lalt lmet spc rmet ralt left down up rght ) ;; Layer without modifiers - used temporarily when tapping home row keys (deflayer nomods esc brdn brup mctl @spotlight f5 f6 prev pp next mute vold volu grv 1 2 3 4 5 6 7 8 9 0 - = bspc tab q w e r t y u i o p [ ] \ caps a s d f g h j k l ; ' ret lsft z x c v b n m , . / rsft fn lctl lalt lmet spc rmet ralt left down up rght ) (deffakekeys to-base (layer-switch base) ) (defalias spotlight (multi lmet spc) ;; Command + Space ;; Tap behavior: switch to nomods layer temporarily, then back to base tap (multi (layer-switch nomods) (on-idle-fakekey to-base tap 20) ) ;; Home row modifiers with bilateral combinations ;; Left hand keys with LEFT-side modifiers a (tap-hold-release-keys $tap-time $hold-time (multi a @tap) lctl $right-hand-keys) s (tap-hold-release-keys $tap-time $hold-time (multi s @tap) lalt $right-hand-keys) d (tap-hold-release-keys $tap-time $hold-time (multi d @tap) lmet $right-hand-keys) f (tap-hold-release-keys $tap-time $hold-time (multi f @tap) lsft $right-hand-keys) ;; Right hand keys with RIGHT-side modifiers j (tap-hold-release-keys $tap-time $hold-time (multi j @tap) rsft $left-hand-keys) k (tap-hold-release-keys $tap-time $hold-time (multi k @tap) rmet $left-hand-keys) l (tap-hold-release-keys $tap-time $hold-time (multi l @tap) ralt $left-hand-keys) ; (tap-hold-release-keys $tap-time $hold-time (multi ; @tap) rctl $left-hand-keys) )