Skip to content

Instantly share code, notes, and snippets.

@tswast
Last active December 20, 2025 17:43
Show Gist options
  • Select an option

  • Save tswast/68a22e10918f3752399a899522154b67 to your computer and use it in GitHub Desktop.

Select an option

Save tswast/68a22e10918f3752399a899522154b67 to your computer and use it in GitHub Desktop.
Kanata Home Row Mods and more
#|
Documentation - https://github.com/jtroo/kanata/blob/main/docs/config.adoc
Examples - https://github.com/jtroo/kanata/tree/main/cfg_samples
|#
;; Home row mods
;; https://github.com/dreamsofcode-io/home-row-mods/blob/main/kanata/macos/kanata.kbd
(defcfg
;; defsrc is still necessary
process-unmapped-keys yes
concurrent-tap-hold yes
;; Try to workaround modifier keys getting stuck.
;; https://github.com/jtroo/kanata/issues/1307
windows-altgr add-lctl-release
)
(defsrc
esc f12
grv bspc
tab
caps a s d f j k l ; ' ret
lsft z x c v b n m , . / rsft
lalt ralt
)
(defvar
tap-time 150
hold-time 200
)
(defalias
a (tap-hold $tap-time $hold-time a lmet)
s (tap-hold $tap-time $hold-time s lalt)
d (tap-hold $tap-time $hold-time d lctl)
f (tap-hold $tap-time $hold-time f lsft)
j (tap-hold $tap-time $hold-time j rsft)
k (tap-hold $tap-time $hold-time k rctl)
l (tap-hold $tap-time $hold-time l ralt)
; (tap-hold $tap-time $hold-time ; rmet)
lp (tap-hold $tap-time $hold-time (unicode "(") lsft)
rp (tap-hold $tap-time $hold-time (unicode ")") rsft)
homeend (tap-hold $tap-time $hold-time home end)
nomodsl (layer-switch nomods)
basel (layer-switch base)
)
(deflayer base
caps @nomodsl
@homeend bspc
grv
esc @a @s @d @f @j @k @l @; ' ret
@lp z x c v b n m , . / @rp
tab bspc
)
(deflayer nomods
caps @basel
@homeend bspc
grv
esc a s d f j k l ; ' ret
lsft z x c v b n m , . / rsft
tab ralt
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment