Skip to content

Instantly share code, notes, and snippets.

@tswast
Last active December 6, 2025 23:59
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
)
(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)
nomodsl (layer-switch nomods)
basel (layer-switch base)
)
(deflayer base
caps @nomodsl
home end
grv
esc @a @s @d @f @j @k @l @; ' bspc
@lp z x c v b n m , . / @rp
tab ret
)
(deflayer nomods
caps @basel
home end
grv
esc a s d f j k l ; ' bspc
lsft z x c v b n m , . / rsft
tab ret
)
;; Remap the Copilot key.
;; Source: Reddit user u/textyash
;; https://www.reddit.com/r/KeyboardLayouts/comments/1e8hrt7/comment/nq73ixk/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
;;
;; Instead of lctl, I map to backspace to be more similar to my moonlander layout.
(defchordsv2
(lsft lmet f23) bspc 200 all-released ()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment