-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkanata.kbd
118 lines (105 loc) · 4.52 KB
/
kanata.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
;; Home row mods QWERTY example with more complexity.
;; Some of the changes from the basic example:
;; - when a home row mod activates tap, the home row mods are disabled
;; while continuing to type rapidly
;; - tap-hold-release helps make the hold action more responsive
;; - pressing another key on the same half of the keyboard
;; as the home row mod will activate an early tap action
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
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
fn lctl lalt lmet spc rmet ralt
)
(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
tap-time-pinky 200
hold-time 150
hold-time-pinky 150
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 , . /
)
)
;; esc to caps
;; right shift to esc
;; caps lock to backspace
;; left shift to hyper for window switch
;; do not change function keys
;; number layers with left cmd
;; symbol layer with right cmd
;; TODO unmapped keys: entire num row from grv to delete
;; TODO unmapped keys: f3 to f6
;; TODO unmapped keys: bottom row fn lctl lalt ralt
(deflayer base
caps brdn brup _ _ _ _ prev pp next mute vold volu
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
bspc @a @s @d @f g h @j @k @l @; ' ret
lsft z x c v b n m , . / esc
fn lctl lalt @num spc @sym ralt
)
(deflayer nomods
caps brdn brup _ _ _ _ prev pp next mute vold volu
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
bspc a s d f g h j k l ; ' ret
lsft z x c v b n m , . / esc
fn lctl lalt @num spc @sym ralt
)
(deflayer sym
caps brdn brup _ _ _ _ prev pp next mute vold volu
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab S-1 S-2 S-[ S-] S-7 y u i o p [ ] \
bspc S-3 S-4 S-9 S-0 S-8 h rmet ralt rctl rsft ' ret
lsft S-5 S-6 [ ] grv n m , . / esc
fn lctl lalt lmet spc rmet ralt
)
(deflayer num
caps brdn brup _ _ _ _ prev pp next mute vold volu
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t 0 1 2 3 \ [ ] \
bspc lsft lctl lalt lmet g - 4 5 6 = ' ret
lsft z x c v b S-- 7 8 9 / esc
fn lctl lalt lmet spc rmet ralt
)
(defalias num (layer-while-held num))
(defalias sym (layer-while-held sym))
(deffakekeys
to-base (layer-switch base)
)
;; (defalias
;; rhyper RM-RA-RC-RS
;; lhyper M-A-C-S
;; rmeh RA-RC-RS
;; lmeh A-C-S
;; )
(defalias
tap (multi
(layer-switch nomods)
(on-idle-fakekey to-base tap 20)
)
;; w (tap-hold-release-keys $tap-time-pinky $hold-time-pinky (multi w @tap) @lmeh $left-hand-keys)
;; e (tap-hold-release-keys $tap-time-pinky $hold-time-pinky (multi e @tap) @lhyper $left-hand-keys)
;; i (tap-hold-release-keys $tap-time-pinky $hold-time-pinky (multi i @tap) @rhyper $left-hand-keys)
;; o (tap-hold-release-keys $tap-time-pinky $hold-time-pinky (multi o @tap) @rmeh $left-hand-keys)
a (tap-hold-release-keys $tap-time-pinky $hold-time-pinky (multi a @tap) lsft $left-hand-keys)
s (tap-hold-release-keys $tap-time $hold-time (multi s @tap) lctl $left-hand-keys)
d (tap-hold-release-keys $tap-time $hold-time (multi d @tap) lalt $left-hand-keys)
f (tap-hold-release-keys $tap-time $hold-time (multi f @tap) lmet $left-hand-keys)
j (tap-hold-release-keys $tap-time $hold-time (multi j @tap) rmet $right-hand-keys)
k (tap-hold-release-keys $tap-time $hold-time (multi k @tap) lalt $right-hand-keys)
l (tap-hold-release-keys $tap-time $hold-time (multi l @tap) rctl $right-hand-keys)
; (tap-hold-release-keys $tap-time-pinky $hold-time-pinky (multi ; @tap) rsft $right-hand-keys)
)