106 lines
4.0 KiB
Plaintext
106 lines
4.0 KiB
Plaintext
;; Kanata Configuration File for Graphite Anglemod Layout
|
|
|
|
;; Add a default configuration section to define unmapped key behavior.
|
|
(defcfg
|
|
process-unmapped-keys no ;; Ensure unmapped keys are passed to the OS unchanged.
|
|
)
|
|
|
|
;; Define the source keys Kanata will intercept.
|
|
(defsrc
|
|
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
|
|
lctl lmet lalt spc ralt rmet rctl
|
|
)
|
|
|
|
(defvar
|
|
tap-time 150
|
|
hold-time 200
|
|
)
|
|
|
|
(defalias
|
|
escctrl (tap-hold 100 100 esc lctl)
|
|
a (multi f24 (tap-hold $tap-time $hold-time a lalt))
|
|
s (multi f24 (tap-hold $tap-time $hold-time s lmet))
|
|
d (multi f24 (tap-hold $tap-time $hold-time d lctl))
|
|
f (multi f24 (tap-hold $tap-time $hold-time f lsft))
|
|
x (multi f24 (tap-hold $tap-time $hold-time x ralt))
|
|
j (multi f24 (tap-hold $tap-time $hold-time j lsft))
|
|
k (multi f24 (tap-hold $tap-time $hold-time k lctl))
|
|
l (multi f24 (tap-hold $tap-time $hold-time l lmet))
|
|
; (multi f24 (tap-hold $tap-time $hold-time ; lalt))
|
|
. (multi f24 (tap-hold $tap-time $hold-time . ralt))
|
|
)
|
|
|
|
;; Default QWERTY Layout
|
|
(deflayer qwerty
|
|
@grl 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
|
|
lctl lmet lalt spc ralt rmet rctl
|
|
)
|
|
|
|
(defalias
|
|
ca (multi f24 (tap-hold $tap-time $hold-time a lalt))
|
|
cr (multi f24 (tap-hold $tap-time $hold-time r lmet))
|
|
cs (multi f24 (tap-hold $tap-time $hold-time s lctl))
|
|
ct (multi f24 (tap-hold $tap-time $hold-time t lsft))
|
|
cc (multi f24 (tap-hold $tap-time $hold-time c ralt))
|
|
cn (multi f24 (tap-hold $tap-time $hold-time n lsft))
|
|
ce (multi f24 (tap-hold $tap-time $hold-time e lctl))
|
|
ci (multi f24 (tap-hold $tap-time $hold-time i lmet))
|
|
co (multi f24 (tap-hold $tap-time $hold-time o lalt))
|
|
)
|
|
|
|
;; Colemak-DH + home row mods
|
|
(deflayer colemak-dh
|
|
@grl 1 2 3 4 5 6 7 8 9 0 - = bspc
|
|
tab q w f p b j l u y ; [ ] \
|
|
caps @ca @cr @cs @ct g m @cn @ce @ci @co ' ret
|
|
lsft x @cc d v z k h , @. / rsft
|
|
lctl lmet lalt spc ralt rmet _
|
|
)
|
|
|
|
(defalias
|
|
quote (fork ' S-- (lsft rsft)) ;; ' -> _
|
|
comma (fork , S-/ (lsft rsft)) ;; , -> ?
|
|
hyphen (fork - S-' (lsft rsft)) ;; - -> "
|
|
slash (fork / S-, (lsft rsft)) ;; / -> <
|
|
)
|
|
|
|
;; Graphite Anglemod Layout
|
|
(deflayer graphite-anglemod
|
|
@grl 1 2 3 4 5 6 7 8 9 0 [ ] bspc
|
|
tab b l d w z @quote f o u j ; = \
|
|
@cap n r t s g y h a e i @comma ret
|
|
lsft x m c v q p k . @hyphen @slash rsft
|
|
lctl lmet lalt spc ralt rmet rctl
|
|
)
|
|
|
|
;; Define layer-switching aliases for clean deflayer declarations
|
|
(defalias
|
|
;; Tap: backtick (grave), Hold: toggles 'layers' for layer switching.
|
|
grl (tap-hold 200 200 grv (layer-toggle layers))
|
|
|
|
;; Layer-switch aliases
|
|
gar (layer-switch graphite-anglemod)
|
|
cdh (layer-switch colemak-dh)
|
|
qwr (layer-switch qwerty)
|
|
|
|
;; Tap for Caps Lock, Hold for Ctrl
|
|
cap (tap-hold 200 200 caps lctl)
|
|
)
|
|
|
|
;; Layer-Switching Layer
|
|
;; Keys 1 and 2 switch between QWERTY and Graphite Anglemod layouts
|
|
;; The _ (underscore) indicates transparent behavior (passes through base layer).
|
|
(deflayer layers
|
|
_ @qwr @cdh @gar _ _ _ _ _ _ _ _ _ _
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _
|
|
_ _ _ _ _ _ _ _ _ _ _ _
|
|
_ _ _ _ _ _ _
|
|
)
|