-
Notifications
You must be signed in to change notification settings - Fork 6
/
karabiner.edn
168 lines (147 loc) · 6.38 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{:templates {:launch "osascript -e 'tell application \"%s\" to activate'"}
:layers {:hyper-mode {:key :caps_lock :alone {:key :escape}}}
:simlayers {:launch-mode {:key :slash}
:tmux-winmove-mode {:key :q :condi :Terminals}
:period-mode {:key :period}
:comma-mode {:key :comma}
:space-mode {:key :spacebar :condi :macbook-internal}}
:main [{:des "Hyper Mode - Control"
:rules [:hyper-mode
[:a :!Tb]
[:c :!Tc]
[:d :!Td]
[:z :!Tz]]}
{:des "Hyper Mode - Navigation [VI style]"
:rules [:hyper-mode
[:j :down_arrow]
[:k :up_arrow]
[:h :left_arrow]
[:l :right_arrow]
[:b :!Oleft_arrow]
[:w :!Oright_arrow]
[:u :home]
[:i :end]
[:!Cj :!Sdown_arrow]
[:!Ck :!Sup_arrow]
[:!Ch :!Sleft_arrow]
[:!Cl :!Sright_arrow]
[:!Cb :!SOleft_arrow]
[:!Cw :!SOright_arrow]
[:!Cu :!Shome]
[:!Ci :!Send]
[:!Oj {:mkey {:y 1536}}]
[:!Ok {:mkey {:y -1536}}]
[:!Oh {:mkey {:x -1536}}]
[:!Ol {:mkey {:x 1536}}]]}
{:des "Hyper Mode - Mousekey"
:rules [:hyper-mode
[:down_arrow {:mkey {:y 1536}}]
[:up_arrow {:mkey {:y -1536}}]
[:left_arrow {:mkey {:x -1536}}]
[:right_arrow {:mkey {:x 1536}}]
[:return_or_enter {:pkey :button1}]
[:!Creturn_or_enter {:pkey :button2}]]}
{:des "Hyper Mode - Deletion"
:rules [:hyper-mode
[:n :!Odelete_or_backspace]
[:m :delete_or_backspace]
[:comma :delete_forward]
[:period :!Odelete_forward]
[:!Cn :!Cdelete_or_backspace]
[:!Cm :!Cdelete_or_backspace]
[:!Ccomma :!Cdelete_forward]
[:!Cperiod :!Cdelete_forward]]}
{:des "Hyper Mode - Misc"
:rules [:hyper-mode
[:escape :caps_lock]
[:grave_accent_and_tilde :!CS5]]}
{:des "Space Mode (Change Mac keyboard to Filco Minila layout with spacebar FN)"
:rules [:space-mode
[:##s :left_arrow]
[:##d :down_arrow]
[:##f :right_arrow]
[:##e :up_arrow]
[:##j :insert]
[:##k :home]
[:##l :page_up]
[:##semicolon :delete_or_backspace]
[:##m :delete_forward]
[:##comma :end]
[:##period :page_down]]}
{:des "Tmux Mode [Q] as Trigger Key"
:rules [:tmux-winmove-mode ;Ta is the prefix for tmux
[:comma [:!Ta :comma]]
[:open_bracket [:!Ta :open_bracket]]
[:close_bracket [:!Ta :close_bracket]]
[:hyphen [:!Ta :hyphen]]
[:backslash [:!Ta :backslash]]
[:f [:!Ta :f]]
[:e [:!Ta :e]]
[:w [:!Ta :w]]
[:h [:!Ta :h]]
[:j [:!Ta :j]]
[:k [:!Ta :k]]
[:l [:!Ta :l]]
[:v [:!Ta :v]]
[:s [:!Ta :s]]
[:m [:!Ta :z]]
[:x [:!Ta :x]]
[:c [:!Ta :c]]
[:1 [:!Ta :1]]
[:2 [:!Ta :2]]
[:3 [:!Ta :3]]
[:4 [:!Ta :4]]
[:5 [:!Ta :5]]]}
{:des "Comma Mode [,] as Trigger Key"
:rules [:comma-mode
[:a :open_bracket]
[:s :close_bracket]
[:d :!S7]
[:f :!S8]
[:q :!Shyphen]
[:w :!Sequal_sign]
[:e :!S5]
[:r :!S6]]}
{:des "Period Mode [.] as Trigger Key"
:rules [:period-mode
[:comma ["period-comma-mode" 1] nil {:alone :comma :afterup ["period-comma-mode" 0]}]
[:a [:!Sgrave_accent_and_tilde :slash]]
[:s [:period :!S8]]
[:d :!S9]
[:f :!S0]
[:q :hyphen]
[:w :equal_sign]
[:e :!Sopen_bracket]
[:r :!Sclose_bracket]]}
{:des "Launcher Mode [L] as Trigger Key"
:rules [:launch-mode
[:t [:launch "Telegram"]]
[:s [:launch "Safari"]]
[:m [:launch "MWeb.app"]]]}
;; {:des "HHKB, FILCO MINILA Change left control to esc if alone"
;; :rules [[:##left_control :left_control [:hhkb-bt :hhkb :hhkb-tmk :filco-minila] {:alone :escape}]]}
{:des "Shift Press Alone to change input source"
:rules [[:right_shift :right_shift nil {:alone :!Tspacebar}]
[:left_shift :left_shift nil {:alone :!Tspacebar}]]}
{:des "Change right_command to command-tab when used alone"
:rules [[:right_command :right_command nil {:alone [:!Ctab]}]]}
{:des "Change right_option to 4 modifiers combination, f17 when used alone"
:rules [[:right_option :!COTleft_shift nil {:alone [:f17]}]]}
{:des "Quit application by pressing command-q twice"
:rules [[:!C#Pq [:!Cq ["command-q" 0]] ["command-q" 1]]
[:!C#Pq ["command-q" 1] nil {:delayed {:invoked ["command-q" 0] :canceled ["commandq" 0]}}]]}]
; the default value is 250
:simlayer-threshold 500
:devices {:macbook-internal [{:product_id 638 :vendor_id 1452}]
:filco-minila [{:product_id 34050 :vendor_id 2652}]
:hhkb-tmk [{:vendor_id 65261 :product_id 51966}]
:hhkb-bt [{:vendor_id 1278 :product_id 514}]
:hhkb [{:vendor_id 2131 :product_id 256}]}
:applications {:Terminals ["^com\\.apple\\.Terminal$"
"^com\\.googlecode\\.iterm2$"]}
:input-sources {:sogou {:input_mode_id "com.sogou.inputmethod.pinyin"
:input_source_id "com.sogou.inputmethod.sogou.pinyin"
:language "zh-Hans"}
:us {:input_mode_id ""
:input_source_id "com.apple.keylayout.ABC"
:language "en"}}}