Replicated symbol/media/nav layers found in my Windows based Kanata configuration.

This commit is contained in:
lulusilly 2026-04-05 12:19:58 -04:00
parent 2495d5b94b
commit 0322e81fe6

View file

@ -1,14 +1,6 @@
#|
Kanata Config
○ Ergonomic (kinda?) 34-key QWERTY layout
○ GACS home-row mods
○ Layers for function, number, media, and symbol keys
○ Dedicated (and non-intrusive!) standard layout toggle for reliant tasks
○ Decently commented for beginners and seasoned veterans alike.
FEEL FREE TO FORK!!!
|#
(defcfg (defcfg
process-unmapped-keys yes
block-unmapped-keys yes
concurrent-tap-hold yes concurrent-tap-hold yes
movemouse-smooth-diagonals yes movemouse-smooth-diagonals yes
@ -54,10 +46,8 @@
chl (chord ch l) chl (chord ch l)
ch_lmet (chord ch lmet) ch_lmet (chord ch lmet)
ch_rmet (chord ch rmet) ch_rmet (chord ch rmet)
;; Remap Caps to Escape/Nav layer
navlayer (layer-while-held nav) navlayer (layer-while-held nav)
caps (tap-hold $tap-time $hold-time (tap-dance 200 (esc caps)) @navlayer) caps (tap-hold $tap-time $hold-time (tap-dance 200 ((multi lctl spc) @meh caps)) @navlayer)
;; Home row mods
a (tap-hold $tap-time $hold-time a lctl) a (tap-hold $tap-time $hold-time a lctl)
s (tap-hold $tap-time $hold-time s lalt) s (tap-hold $tap-time $hold-time s lalt)
d (tap-hold $tap-time $hold-time d lmet) d (tap-hold $tap-time $hold-time d lmet)
@ -66,25 +56,16 @@
k (tap-hold $tap-time $hold-time k lmet) k (tap-hold $tap-time $hold-time k lmet)
l (tap-hold $tap-time $hold-time l lalt) l (tap-hold $tap-time $hold-time l lalt)
scln (tap-hold $tap-time $hold-time scln rctl) scln (tap-hold $tap-time $hold-time scln rctl)
;; Meh and Hyper key definitions
hyper (multi lsft lctl lalt lmet) hyper (multi lsft lctl lalt lmet)
meh (multi lsft lctl lalt) meh (multi lsft lctl lalt)
;; Numpad layer
numpad (layer-while-held num) numpad (layer-while-held num)
g (tap-hold $tap-time $hold-time g @numpad) g (tap-hold $tap-time $hold-time g @numpad)
;; Function key layer
fnkeys (layer-while-held fn) fnkeys (layer-while-held fn)
h (tap-hold $tap-time $hold-time h @fnkeys) h (tap-hold $tap-time $hold-time h @fnkeys)
#|
Meh key when V or M are held down to allow for either hand to
use hyper key for AHK/Raycast shortcuts.
|#
v (tap-hold $tap-time $hold-time v @meh) v (tap-hold $tap-time $hold-time v @meh)
m (tap-hold $tap-time $hold-time m (multi lsft lctl lalt)) m (tap-hold $tap-time $hold-time m @meh)
;; Holding Spacebar activates symbol layer
symbols (layer-while-held symbol) symbols (layer-while-held symbol)
spc (tap-hold $tap-time $hold-time spc @symbols) spc (tap-hold $tap-time $hold-time spc @symbols)
;; Media layer when Z or / are held.
medialy (layer-while-held md) medialy (layer-while-held md)
z (tap-hold $tap-time $hold-time z @medialy) z (tap-hold $tap-time $hold-time z @medialy)
/ (tap-hold $tap-time $hold-time / @medialy) / (tap-hold $tap-time $hold-time / @medialy)
@ -92,36 +73,27 @@
;; Chord definitions. Kind of weird to read as a layperson ;; Chord definitions. Kind of weird to read as a layperson
;; so I provided sufficient comments for general understanding. ;; so I provided sufficient comments for general understanding.
(defchords ch $chord-time (defchords ch $chord-time
(w ) w ;; W => W (w ) w
( e) e ;; E => E ( e) e
(w e) XX ;; W + E => Enter (w e) XX
(i ) i ;; I => I (i ) i
( o) o ;; O => O ( o) o
(i o) XX ;; I + O => (i o) XX
(s ) @s ;; S => S (s ) @s
( d) @d ;; D => D ( d) @d
(s d) ret ;; S + D => (s d) ret
(f ) @f (f ) @f
(f d) tab ;; F + D = Tab (f d) tab
(j ) @j (j ) @j
(j k) esc ;; J + K => Escape (j k) esc
(k ) @k ;; K => K (See defalias) (k ) @k
( l) @l ;; L => L (See defalias) ( l) @l
(k l) bspc ;; K + L => Escape (k l) bspc
;; Cmd => Hyper Key, Cmd × 2 => Cmd
(lmet ) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lmet)) (lmet ) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lmet))
( rmet) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lmet)) ( rmet) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lmet))
#|
Put simply, the below line allows for toggling a no-bind
layer for when you may require a standard layout (such as
playing Street Fighter, Counter Strike, etc.) by pressing
both Meta keys at the same time. You can toggle back to the
base layer by holding both Meta keys at the same time, as to allow
for normal functionality when holding either key down for a shortcut.
|#
(lmet rmet) (tap-hold $tap-time $hold-time @normie (layer-switch base)) (lmet rmet) (tap-hold $tap-time $hold-time @normie (layer-switch base))
) )
;; Base layer with all binds enabled
(deflayer base (deflayer base
@caps @caps
q @chw @che r t y u @chi @cho p q @chw @che r t y u @chi @cho p
@ -129,15 +101,15 @@
@z x c @v b n @m , . @/ @z x c @v b n @m , . @/
@ch_lmet @spc @ch_rmet @ch_lmet @spc @ch_rmet
) )
;; Navigation layer
(deflayer nav (deflayer nav
_ _
_ (movemouse-up 3 3) _ _ _ _ mlft mrgt pgup pgdn mbck (movemouse-up 3 2) mfwd _ _ _ mlft mrgt (mwheel-up 50 120) (mwheel-down 50 120)
(movemouse-left 3 3) (movemouse-down 3 3) (movemouse-right 3 3) _ home left down up right end (movemouse-left 3 2) (movemouse-down 3 2) (movemouse-right 3 2) _ home left down up right end
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _
) )
;; Numpad Layer
(deflayer num (deflayer num
_ _
_ _ _ _ _ _ 7 8 9 _ _ _ _ _ _ _ 7 8 9 _
@ -145,7 +117,7 @@
_ _ _ _ _ 1 2 3 _ _ _ _ _ _ 1 2 3 _
_ _ _ _ _ _
) )
;; Function key layer
(deflayer fn (deflayer fn
_ _
f1 f2 f3 f4 _ _ _ _ _ _ f1 f2 f3 f4 _ _ _ _ _ _
@ -153,16 +125,15 @@
f9 f10 f11 f12 _ _ _ _ _ f9 f10 f11 f12 _ _ _ _ _
_ _ _ _ _ _
) )
;; Symbol layer
(deflayer symbol (deflayer symbol
_ _
S-1 S-2 S-3 S-4 S-5 S-6 S-7 S-8 S-9 S-0 S-1 S-2 S-3 S-4 S-5 S-6 S-7 S-8 S-9 S-0
- S-= S-[ S-] [ ] S-` S-scln S-\ \ S-\ = - S-= S-- ` S-` S-scln ' S-'
= _ _ ` _ S-- _ _ ' S-' _ \ S-[ S-] S-, S-. [ ] _ _
_ _ _ _ _ _
) )
;; Aformentioned standard layer with combo binds for toggling back
;; to base layer.
(deflayer norm (deflayer norm
esc esc
q w e r t y u i o p q w e r t y u i o p
@ -170,11 +141,11 @@
z x c v b n m , . / z x c v b n m , . /
@ch_lmet spc @ch_rmet @ch_lmet spc @ch_rmet
) )
;; Media layer
(deflayer md (deflayer md
_ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
prev pp next mute vold volu brdn brup ins del prev pp next mute XX XX vold volu brdn brup
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _
) )