-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathkarabiner.edn
More file actions
130 lines (113 loc) · 5.22 KB
/
karabiner.edn
File metadata and controls
130 lines (113 loc) · 5.22 KB
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
{:templates {:launch "osascript -e 'on run argv' -e 'set appName to item 1 of argv' -e 'tell application \"System Events\"' -e 'set frontApp to name of first application process whose frontmost is true' -e 'end tell' -e 'if frontApp is appName then' -e 'tell application \"System Events\" to set visible of application process appName to false' -e 'else' -e 'tell application appName to activate' -e 'end if' -e 'end run' -- \"%s\""
:open "open %s"
:shell "/bin/bash -c '%s'"}
:layers {:hyper-mode {:key :caps_lock :alone {:key :escape}}}
:simlayers {:launch-mode {:key :slash}
:period-mode {:key :period}
:comma-mode {:key :comma}}
: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 "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 [/] as Trigger Key"
:rules [:launch-mode
[:t [:launch "Telegram"]]
[:q [:launch "QSpace Pro"]]
[:c [:launch "Cursor"]]
[:w [:launch "WeChat"]]
[:i [:launch "iTerm2"]]
[:d [:launch "Dia"]]
[:s [:launch "Spark"]]
[:f [:launch "Feishu"]]
[:h :!Ch]]}
{:des "Right_shift pressed alone to change input source"
:rules [[:right_shift :right_shift nil {:alone :fn}]]}
{: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"}}}