forked from houmain/keymapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeymapper.conf
228 lines (197 loc) · 7.34 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
# define some aliases
Alt = AltLeft
AltGr = AltRight
Win = Meta
# immediately forward common modifier keys (also used as mouse modifiers)
Shift >> Shift
Control >> Control
Alt >> 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} >> AltLeft
Ext{D} >> Shift
Ext{F} >> Control
Ext{A} >> AltLeft # 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} >> Control{X}
Ext{C} >> Control{C}
Ext{V} >> edit_paste
Ext{E} >> Control{F}
(Ext Shift){Z} >> edit_redo
Ext{Z} >> Control{Y}
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 (on german layout)
AltGr{I} >> !AltGr BracketLeft # ü
AltGr{A} >> !AltGr Quote # ä
AltGr{Semicolon} >> !AltGr Semicolon # ö
AltGr{D} >> !AltGr Minus # ß
AltGr{Backquote} >> !AltGr Shift{Backquote} # °
E >> F
R >> P
T >> G
Y >> J
U >> L
I >> U
O >> Z
Z >> Y
Shift{P} >> Period
P >> Shift{Comma}
S >> R
D >> S
F >> T
G >> D
J >> N
K >> E
L >> I
Semicolon >> O
N >> K
Shift{Quote} >> Shift{2}
Quote >> Shift{Backslash}
Shift{Period} >> Shift{IntlBackslash}
Shift{Comma} >> !Shift IntlBackslash
Shift{BracketLeft} >> !Shift AltGr{7}
BracketLeft >> AltGr{8}
Shift{BracketRight} >> !Shift AltGr{0}
BracketRight >> AltGr{9}
Shift{Backquote} >> Equal Space
Backquote >> AltGr{BracketRight}
Shift{2} >> !Shift AltGr{Q}
Shift{3} >> !Shift Backslash
Shift{6} >> !Shift Backquote Space
Shift{7} >> Shift{6}
Shift{8} >> BracketRight
Shift{9} >> Shift{8}
Shift{0} >> Shift{9}
Minus >> Slash
Shift{Equal} >> !Shift BracketRight
Equal >> Shift{0}
Shift{Backslash} >> !Shift AltGr{IntlBackslash}
Backslash >> AltGr{Minus}
Shift{Slash} >> Shift{Minus}
Slash >> Shift{7}
# default mappings for abstract commands
close_window >> !Win Alt{F4}
navigate_escape >> Escape
cursor_home >> !Control Home
cursor_end >> !Control End
open_file >> Control{O}
navigate_back >> Alt{ArrowLeft}
navigate_fore >> Alt{ArrowRight}
next_tab >> !Win Control{PageUp}
prev_tab >> !Win Control{PageDown}
edit_paste >> Control{V}
edit_redo >> !Shift Control{Z}
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="Linux"]
suspend_machine >> (Win Control Alt){S}
poweroff_machine >> (Win Control Alt){P}
reboot_machine >> (Win Control Alt){R}
lower_window >> !Win (Alt Shift){PageDown}
open_terminal >> Win{C}
[system="Linux" class="Thunar"]
cursor_home >> Backspace
cursor_end >> Enter
open_terminal >> !Win (Shift Control){C}
[system="Linux" class="tilix"]
close_window >> !Win (Shift Control){W}
edit_paste >> (Shift Control){V}
open_terminal >> !Win ContextMenu ^ Enter
[system="Windows"]
suspend_machine >> !Control !Alt Win{X} ^ R E
poweroff_machine >> !Control !Alt Win{X} ^ R R
reboot_machine >> !Control !Alt Win{X} ^ R N
lower_window >> !Win Alt{Escape}
open_terminal >> Win{R} ^ C M D Enter
[system="Windows" class="CabinetWClass"] # Windows Explorer
open_terminal >> F4 ^ Control{A} C M D 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}