-
Notifications
You must be signed in to change notification settings - Fork 28
/
keymapper.conf
250 lines (217 loc) · 7.77 KB
/
keymapper.conf
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# define some aliases
Alt = AltLeft
AltGr = AltRight
Win = Meta
Command = Meta
# immediately forward common modifier keys (also used as mouse modifiers)
@forward-modifiers Shift Control Alt
# define a virtual "boss" key, which can be toggled using the scroll-lock key
# when the boss key is "pressed", the keyboard should be intuitively useable
Boss = Virtual1
ScrollLock >> Boss
# add mappings in context which is active when boss key is not pressed
[modifier="!Boss"]
# map Capslock to Backspace
Control{CapsLock} >> CapsLock
CapsLock >> Backspace
# define an additional modifier "Ext" (angular bracket key on some keyboards)
Ext = IntlBackslash
# the Ext modifier alone should have no effect
Ext >>
# map Ext-S/D/F to Alt/Shift/Control
Ext{S} >> Alt
Ext{D} >> Shift
Ext{F} >> Control
Ext{A} >> Alt # also map A because of S/D rollover
# Ext-W and the navigation keys should step in/out/over during debugging
Ext{W{L}} >> debug_step_into
Ext{W{J}} >> debug_step_out
Ext{W{K}} >> debug_step_over
Ext{W{Any}} >>
# map Ext-I/J/K/L to cursor keys...
Ext{I} >> ArrowUp
Ext{K} >> ArrowDown
Ext{J} >> ArrowLeft
Ext{L} >> ArrowRight
Ext{U} >> cursor_home
Ext{O} >> cursor_end
Ext{Y} >> PageUp
Ext{H} >> PageDown
Ext{Semicolon} >> Backspace
Ext{Q} >> navigate_escape
Ext{Space} >> Space
Ext{M} >> Enter
Ext{X} >> edit_cut
Ext{C} >> edit_copy
Ext{V} >> edit_paste
Ext{E} >> Control{F}
Ext{Z} >> edit_undo
(Ext Shift){Z} >> edit_redo
Ext{F} >> find
Ext{Comma} >> navigate_back
Ext{Period} >> navigate_fore
Ext{T} >> open_file
Ext{G} >> go_to_definition
Ext{BracketRight} >> AudioVolumeUp
Ext{BracketLeft} >> AudioVolumeDown
Ext{R} >> Delete
Ext{B} >> build
# map Ext-number keys to function keys
Ext{1} >> F1
Ext{2} >> edit_rename
Ext{3} >> F3
Ext{4} >> F4
Ext{5} >> F5
Ext{6} >> F6
Ext{7} >> F7
Ext{8} >> F8
Ext{9} >> F9
Ext{0} >> F10
Ext{Minus} >> F11
Ext{Equal} >> F12
# the Ext modifier together with other keys should have no effect
Ext{Any} >>
# add some Windows-key commands
Win{C} >> open_terminal
Win{Q} >> close_window
Win{A} >> lower_window
Win{Tab} >> next_tab
(Win Shift){Tab} >> prev_tab
(Win Control Alt){S} >> suspend_machine
(Win Control Alt){P} >> poweroff_machine
(Win Control Alt){R} >> reboot_machine
# pass other Windows key combinations unmapped
Win{Any} >> Win{Any}
# colemak layout mapping
(Shift AltGr){I} >> 'Ü'
AltGr{I} >> 'ü'
(Shift AltGr){A} >> 'Ä'
AltGr{A} >> 'ä'
(Shift AltGr){Semicolon} >> 'Ö'
AltGr{Semicolon} >> 'ö'
AltGr{D} >> 'ß'
AltGr{Q} >> '@'
AltGr{Backquote} >> '°'
E >> F
R >> P
T >> G
Y >> J
U >> L
I >> U
O >> Z
Z >> Y
Shift{P} >> ':'
P >> ';'
S >> R
D >> S
F >> T
G >> D
J >> N
K >> E
L >> I
Semicolon >> O
N >> K
Shift{Quote} >> '"'
Quote >> "'"
Shift{Comma} >> '<'
Shift{Period} >> '>'
Shift{BracketLeft} >> '{'
BracketLeft >> '['
Shift{BracketRight} >> '}'
BracketRight >> ']'
Shift{Backquote} >> Shift{Equal} Space # dead key '`'
Backquote >> '~'
Shift{2} >> '@'
Shift{3} >> '#'
Shift{6} >> Backquote Space # dead key '^'
Shift{7} >> '&'
Shift{8} >> '*'
Shift{9} >> '('
Shift{0} >> ')'
Shift{Minus} >> '_'
Minus >> '-'
Shift{Equal} >> '+'
Equal >> '='
Shift{Backslash} >> '|'
Backslash >> '\'
Shift{Slash} >> '?'
Slash >> '/'
# default mappings for abstract commands
open_terminal >> Any
suspend_machine >> Any
poweroff_machine >> Any
reboot_machine >> Any
close_window >> Alt{F4}
navigate_escape >> Escape
cursor_home >> Home
cursor_end >> End
open_file >> Control{O}
navigate_back >> Alt{ArrowLeft}
navigate_fore >> Alt{ArrowRight}
next_tab >> Control{PageUp}
prev_tab >> Control{PageDown}
edit_copy >> Control{C}
edit_cut >> Control{X}
edit_paste >> Control{V}
edit_undo >> Control{Y}
edit_redo >> Control{Z}
find >> Control{F}
build >> Control{B}
debug_step_over >> F10
debug_step_into >> F11
debug_step_out >> Shift{F11}
edit_rename >> F2
# system/application specific mappings for abstract commands
[system="MacOS"]
@macos-iso-keyboard
close_window >> Command{Q}
cursor_home >> Command{ArrowLeft}
cursor_end >> Command{ArrowRight}
edit_cut >> Command{X}
edit_copy >> Command{C}
edit_paste >> Command{V}
edit_undo >> Command{Y}
edit_redo >> (Command Shift){Y}
find >> Command{F}
[system="Linux"]
lower_window >> (Alt Shift){PageDown}
[system="Linux" class="Thunar"]
cursor_home >> Backspace
cursor_end >> Enter
open_terminal >> (Shift Control){C}
[system="Linux" class="tilix"]
close_window >> (Shift Control){W}
edit_paste >> (Shift Control){V}
open_terminal >> ContextMenu ^ Enter
[system="Windows"]
suspend_machine >> Win{X} 300ms U S
poweroff_machine >> Win{X} 300ms U U
reboot_machine >> Win{X} 300ms U R
lower_window >> Alt{Escape}
open_terminal >> $(start cmd)
[system="Windows" class="CabinetWClass"] # Windows Explorer
open_terminal >> F4 ^ Control{A} "cmd" Enter
[title="Mozilla Firefox"]
open_file >> Control{K}
navigate_escape >> Escape Control{F} Escape
go_to_definition >> Shift{Backslash}
[title="Chromium"]
open_file >> Control{L}
navigate_escape >> Control{L} F6
[title="Qt Creator"]
open_file >> Control{K}
go_to_definition >> F2
edit_redo >> (Control Shift){Y}
edit_rename >> (Control Shift){R}
[title=/Code - OSS|Visual Studio Code/]
go_to_definition >> F12
navigate_back >> (Control Alt){Slash}
navigate_fore >> (Control Shift){Slash}
build >> (Control Shift){B}
[title="Visual Studio"]
go_to_definition >> F12
navigate_back >> Control{Slash}
navigate_fore >> (Control Shift){Slash}
build >> (Control Shift){B}
[title="Geany"]
go_to_definition >> (Control Shift){T}