Skip to content

Instantly share code, notes, and snippets.

@chklauser
Created December 30, 2024 14:06
Show Gist options
  • Save chklauser/274e9ab5a65f316333e5a7e2deca1ec1 to your computer and use it in GitHub Desktop.
Save chklauser/274e9ab5a65f316333e5a7e2deca1ec1 to your computer and use it in GitHub Desktop.
Kanata Keymap for home row modifiers on and a nav cluster
#| --------------------------------------------------------------------------
KMonad: US ansi 100% template
This file contains the `defsrc` configuration for a standard US-ansi 100%
keyboard. Modelled on a standard DAS-keyboard 100%. Copy out the 'defsrc'
layer to start your own keyboard configuration. Copy out the `deflayer`
template to easily start a new layer with matching `transparent` buttons.
(deflayer name
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _
)
-------------------------------------------------------------------------- |#
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ssrq slck pause
grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup nlck kp/ kp* kp-
tab q w e r t y u i o p [ ] \ del end pgdn kp7 kp8 kp9 kp+
caps a s d f g h j k l ; ' ret kp4 kp5 kp6
lsft z x c v b n m , . / rsft up kp1 kp2 kp3 kprt
lctl lmet lalt spc ralt rmet cmp rctl left down rght kp0 kp.
)
(deflayer (base 🖻 e)
caps _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
esc @a @s @d @f _ _ @j @k @l @; _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ @spc _ _ _ _ _ _ _ _ _
)
(deflayer (nomods 🖻 e)
caps _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
esc a s d f g _ j k l ; _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ spc _ _ _ _ _ _ _ _ _
)
(deflayer (nav 🖻 n)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 _ _ _ _ _ _ _ _ _ _
_ S-1 S-2 S-3 S-4 S-5 pgup home up end mfwd _ _ _ _ _ _ _ _ _ _
_ @* @& @{ @lp [ pgdn left down rght mbck _ _ _ _ _
_ _ S-6 S-] S-0 ] bspc @ptb ins @ntb del _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _
)
(defcfg
process-unmapped-keys yes
log-layer-changes no
tray-icon e.png
)
(defvar
;; Note: consider using different time values for your different fingers.
;; For example, your pinkies might be slower to release keys and index
;; fingers faster.
tap-time 200
hold-time 250
left-hand-keys (
q w e r t
;;a s d f g
z x c v b
)
right-hand-keys (
y u i o p
;;h j k l ;
n m , . /
)
)
(deffakekeys
to-base (layer-switch base)
)
(defalias
tap (multi
(layer-switch nomods)
(on-idle-fakekey to-base tap 20)
)
;;tap XX
a (tap-hold-release-keys $tap-time $hold-time (multi a @tap) lmet $left-hand-keys)
s (tap-hold-release-keys $tap-time $hold-time (multi s @tap) lalt $left-hand-keys)
d (tap-hold-release-keys $tap-time $hold-time (multi d @tap) lctl $left-hand-keys)
f (tap-hold-release-keys $tap-time $hold-time (multi f @tap) lsft $left-hand-keys)
* (tap-hold-release-keys $tap-time $hold-time (multi S-8 @tap) lmet $left-hand-keys)
& (tap-hold-release-keys $tap-time $hold-time (multi S-7 @tap) lalt $left-hand-keys)
{ (tap-hold-release-keys $tap-time $hold-time (multi S-[ @tap) lctl $left-hand-keys)
lp (tap-hold-release-keys $tap-time $hold-time (multi S-9 @tap) lsft $left-hand-keys)
;;g (tap-hold-release-keys $tap-time $hold-time (multi g @tap) (layer-while-held nav) $left-hand-keys)
j (tap-hold-release-keys $tap-time $hold-time (multi j @tap) rsft $right-hand-keys)
k (tap-hold-release-keys $tap-time $hold-time (multi k @tap) rctl $right-hand-keys)
l (tap-hold-release-keys $tap-time $hold-time (multi l @tap) ralt $right-hand-keys)
; (tap-hold-release-keys $tap-time $hold-time (multi ; @tap) rmet $right-hand-keys)
spc (tap-hold-release $tap-time $hold-time spc (layer-while-held nav))
ptb (unmod lctl lsft tab)
ntb (unmod lsft tab)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment