Skip to content

Instantly share code, notes, and snippets.

@kohane27
Last active April 8, 2024 21:28
Show Gist options
  • Select an option

  • Save kohane27/f2ea851af5bb2bae7d2f3c411d1181ef to your computer and use it in GitHub Desktop.

Select an option

Save kohane27/f2ea851af5bb2bae7d2f3c411d1181ef to your computer and use it in GitHub Desktop.
kanata.kbd
(defcfg
linux-dev /dev/input/by-path/platform-i8042-serio-0-event-kbd
process-unmapped-keys yes
)
;; layers
(defalias
super (layer-toggle super)
alt_nav (layer-toggle alt_nav)
)
;; home-row mod
(defalias
met_a (tap-hold 200 200 a lmet)
alt_s (tap-hold 200 200 s lalt)
sft_d (tap-hold 200 200 d lsft)
ctl_f (tap-hold 200 200 f lctl)
ctl_j (tap-hold 200 200 j rctl)
sft_k (tap-hold 200 200 k rsft)
alt_l (tap-hold 200 200 l lalt)
met_; (tap-hold 200 200 ; rmet)
)
(defalias
ssup (tap-hold 200 200 spc @super) ;; tap: spc hold: super layer
anav (tap-hold 200 200 lalt @alt_nav) ;; tap: spc hold: super layer
)
;; source; https://github.com/kmonad/kmonad/blob/master/keymap/template/thinkpad_T430_iso.kbd
;; NOTE: DO NOT CHANGE
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end ins del
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
wkup lctl lmet lalt spc ralt sys rctl pgdn up pgup
left down rght
)
(deflayer base
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end ins del
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
lctl @met_a @alt_s @sft_d @ctl_f g h @ctl_j @sft_k @alt_l @met_; ' ret
lsft z x c v b n m , . / rsft
wkup lctl lmet @anav @ssup ralt sys rctl pgdn up pgup
left down rght
)
(deflayer super
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ M-q M-w M-e M-r M-t M-y M-u M-i M-o M-p _ _ _
_ M-1 M-2 M-3 M-4 M-5 M-h M-j M-k M-l M-; _ _
_ M-6 M-7 M-8 M-9 M-0 M-n M-m M-, M-. M-/ _
_ _ _ _ _ _ _ _ _ _ _
_ _ _
)
(deflayer alt_nav
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ A-q A-w A-e A-r A-t A-y A-u A-i A-o A-p _ _ _
_ A-1 A-2 A-3 A-4 A-5 A-h A-j A-k A-l A-; _ _
_ A-6 A-7 A-8 A-9 A-0 A-n A-m A-, A-. A-/ _
_ _ _ _ _ _ _ _ _ _ _
_ _ _
)
@a-lipson

a-lipson commented Apr 8, 2024

Copy link
Copy Markdown

thanks for this example!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment