-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkmonad.config.kbd
57 lines (49 loc) · 2.54 KB
/
kmonad.config.kbd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
(defcfg
input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
output (uinput-sink "KMonad kbd"))
;; copied from https://github.com/kmonad/kmonad/blob/master/keymap/template/thinkpad_T430_iso.kbd
;; seems to match Thinkpad X1 Carbon Gen 11 keyboard
(defsrc
mute vold volu
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
)
;; TODO: try the different tap-hold, tap-hold-next, tap-next-release, tap-next-press, tap-hold-next-release
;; https://github.com/kmonad/kmonad/blob/master/doc/quick-reference.md
;; `tab` activates `spacefn` layer if held
(defalias
;; works for tab good enough
sptab (tap-next tab (layer-toggle spacefn))
;; for spacefn we need tap-hold
spcfn (tap-hold 150 spc (layer-toggle spacefn)))
;; first layer named `base`
(deflayer base
mute vold volu
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
@sptab 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 @spcfn ralt sys rctl pgdn up pgup
left down rght
)
;; TODO: See https://askubuntu.com/questions/1242402/map-media-keys-volume-up-down-to-custom-actions
;; For multimedia keys
;; dead tilde and circumflex
(defalias tld (around lsft grv))
(defalias cfl (around lsft 6))
(deflayer spacefn
_ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ grv _ home _ _ _ _ _ _
_ _ _ _ _ @tld left down up rght bspc _ _
_ _ _ _ _ @cfl end del ins pgup pgdn _
_ _ _ _ _ _ _ _ _ _ _
_ _ _
)