-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmac.kbd
73 lines (65 loc) · 3.17 KB
/
mac.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
(defcfg
;; On macOS, the input device will be different
;; You'll need to find your keyboard's device path using:
;; ls /dev/input/by-id/ (for external keyboard)
;; or /dev/input/by-path/ (for built-in keyboard)
input (iokit-name "Apple Internal Keyboard / Trackpad")
;; For macOS, we use a different output method
output (kext)
;; Allow command to function normally for common macOS shortcuts
fallthrough true
)
;; Your aliases remain largely the same, but we'll adjust the modifiers
;; to work well with macOS conventions
(defalias
num (tap-next bspc (layer-toggle num))
nav (tap-next tab (layer-toggle nav))
;; Updated modifier mappings for macOS
;; Using command (cmd) where you had meta (met)
;; Left hand homerow mods
opt_a (tap-hold-next-release 200 a lalt) ; Pinky - Option
cmd_r (tap-hold-next-release 200 r lmet) ; Ring - Command
ctl_s (tap-hold-next-release 180 s lctl) ; Middle - Control
sft_t (tap-hold-next-release 180 t lsft) ; Index - Shift
;; Right hand homerow mods (mirroring the left)
sft_n (tap-hold-next-release 180 n rsft) ; Index - Shift
ctl_e (tap-hold-next-release 180 e rctl) ; Middle - Control
cmd_i (tap-hold-next-release 200 i rmet) ; Ring - Command
opt_o (tap-hold-next-release 200 o ralt) ; Pinky - Option
)
;; MacBook keyboard source layout
(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 up
fn lctl lalt lmet spc rmet ralt left down rght
)
;; Base layer with Colemak-DH, homerow mods, and arrow keys
(deflayer base
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 f p b j l u y ' [ ] \
caps @opt_a @cmd_r @ctl_s @sft_t g m @sft_n @ctl_e @cmd_i @opt_o ; ret
lsft z x c d v k h , . / @num up
fn lctl @nav @num spc @num ralt left down rght
)
;; Number layer adjusted to preserve arrow key functionality
(deflayer num
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
tab ! @ { } | + 7 8 9 * _ _ _
caps _ $ \( \) ` - 4 5 6 : _ _
_ % ^ [ ] ~ = 1 2 3 / _ up
_ _ _ _ 0 _ _ left down rght
)
;; Navigation layer adjusted to preserve arrow key functionality
(deflayer nav
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ + 7 8 9 * _ _ _
_ @cmd_a @alt_r @ctl_s @sft_t _ left down up rght _ _ _
_ _ _ _ _ _ = j k 3 / _ up
_ _ _ _ _ _ _ left down rght
)