-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarabiner.edn
143 lines (124 loc) · 4.94 KB
/
karabiner.edn
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
;; define application identifiers
:applications {:chrome ["^com\\.google\\.Chrome$"]
:vscode ["^com\\.microsoft\\.VSCode$"]
:finder ["^com\\.apple\\.finder$"]
:ff ["^org\\.mozilla\\.firefox$"]
:slack ["^com\\.tinyspeck\\.slackmacgap$"]
:zoom ["us\\.zoom\\.xos"]
}
:templates {:open "open \"%s\""}
:layers {
:hyper-mode {:key :caps_lock :alone {:key :escape}} ;; make the caps_lock key the hyper key
;; In "System Preferences/Keyboard/Modifier Keys..."
;; the Caps Lock Key is set to "No Action".
}
:simlayers {:launch-mode {:key :w}}
;; Define different kinds of keyboards
:devices {
:kb-apple [
{:vendor_id 1452, :product_id 832 } ;; MacBook keyboard
]
:kb-mini [ ;; Mini Keyboard
{:vendor_id 1452, :product_id 556 } ;; Mini Keyboard Bluetooth
{:vendor_id 4489, :product_id 34867 } ;; Mini Keyboard USB
]
:kb-all [ ;; Group with all keyboards
{:vendor_id 1452, :product_id 832 } ;; MacBook keyboard
{:vendor_id 1452, :product_id 556 } ;; Mini Keyboard Bluetooth
{:vendor_id 4489, :product_id 34867 } ;; Mini Keyboard USB
{:vendor_id 1452, :product_id 591 } ;; Keychron K3 keyboard
]
:kb-keychron-k3 [
{:vendor_id 1452, :product_id 591 } ;; Keychron K3 keyboard
]
} ;; devices
:main [
;; MINI KEYBOARD
{:des "Mini Keyboard shortcuts"
:rules [ :kb-mini
[:r [:volume_increment]] ;; lower knob turning right
[:p [:volume_decrement]] ;; lower knob turning left
]
}
;;CHROME
{:des "Chrome Fn Keys"
:rules [
[:f1 :!Tpage_up :chrome] ;; Go to previous tab
[:f2 :!Tpage_down :chrome] ;; Go to next tab
[:f3 :!Cw] ;; Close tab
[:f9 :!Cl] ;; Go to Address Bar
]
}
;; VSCODE
{:des "VSCode Fn Keys"
:rules [
[:f1 :!COleft_arrow :vscode] ;; Go to previous tab: Option + Command + Left Arrow
[:f2 :!COright_arrow :vscode] ;; Go to next tab: Option + Command + Right Arrow
[:f3 :!Cw :vscode] ;; Close tab Command + w
]
}
;; FIREFOX
{:des "Firefox Fn Keys"
:rules [
[:f1 :!COleft_arrow :ff] ;; Go to previous tab: Option + Command + Left Arrow
[:f2 :!COright_arrow :ff] ;; Go to next tab: Option + Command + Right Arrow
[:f3 :!Cw :ff] ;; Close tab Command + w
]
}
;;FINDER
{:des "Finder Fn Keys"
:rules [
[:f1 :!COopen_bracket :finder];; Go back
[:f2 :!Copen_bracket :finder];; Cycle through windowss
[:f3 :!Cw :finder];; Close tab
]
}
{:des "Slack keys"
:rules [
[:f4 :!OSup_arrow :slack] ;; Option+Shift+Up_arrow to Previous unread channel or DM
[:f1 :!C1 :slack] ;; Cmd+1 go to Workspace 1: WL
[:f2 :!C2 :slack] ;; Cmd+2 go to Workspace 2: EST
]
}
{:des "Launch Apps"
:rules [
[:f4 [:open "/Applications/Slack.app"]]
[:f5 [:open "/Applications/zoom.us.app"]]
[:f6 [:open "/Users/enrique.cuevas/Applications/Chrome Apps.localized/Google Calendar.app"]]
]
}
;; Use caps_lock key to launch apps or actions in VSCode/VSCodium
{:des "Caps Lock" ; Hold 'caps_lock' + extra key
:rules [ :hyper-mode
[:c [:!SCc ] :slack ] ; 'Shift + Command + c ' - Format code in Slack
[:t [:!SCt ] :slack ] ; 'Shift + Command + t ' - Go to Threads in Slack
[:spacebar [:!SCa] :slack ] ; 'Shift + Command + t ' - Go to All unreads in Slack
[:a [:!SCm :return_or_enter] :chrome ] ; 'Shift + Command + m ' then Enter - To switch to another Chrome account
[:w [:!SCw] ] ; 'Shift + Command + w ' - Close window
]
}
{:des "Launch Mode"
:rules [
[:k [:open "/Applications/Emacs.app"] :launch-mode]
[:l [:open "/Applications/Google Chrome.app"] :launch-mode]
]
}
]
;; code won't read cheatsheet section
;; ! stand for mandatory
;; # stand for optional
;; C T O S for left command control optional shift
;; F for fn
;; need to prefix C T O S F with ! or #
:cheatsheet {:!Ca "command a" ;; mandatory left_command
:!Ta "control a" ;; mandatory left_control
:!Oa "option a"
:!Sa "shift a"
:#Sa "shift a" ;; keycode a, optional left_shift
:!CTOa "command control option a"
:!Cspacebar "command space"
:!Fa "fn a"
:##a "keycode a optional any"
:!!a "mandatory hyper(control command option shift) a "}
}