You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ A cross-platform context-aware key remapper. It allows to:
21
21
* Redefine your keyboard layout and shortcuts systemwide or per application.
22
22
* Manage all your keyboard shortcuts in a single configuration file.
23
23
* Change shortcuts for similar actions in different applications at once.
24
-
* Share configuration files between multiple systems (GNU/Linux, Windows, MacOS).
24
+
* Share configuration files between multiple systems (GNU/Linux, Windows, MacOS, FreeBSD).
25
25
* Specify input and output as [characters](#character-typing) instead of the keys required to type them.
26
26
* Bind keyboard shortcuts to [launch applications](#application-launching).
27
27
* Control the state from external applications using [keymapperctl](#keymapperctl).
@@ -41,7 +41,7 @@ Control{Q} >> Alt{F4}
41
41
42
42
Unless overridden using the command line argument `-c`, the configuration is read from `keymapper.conf`, which is looked for in the common places:
43
43
* on all systems in `$XDG_CONFIG_HOME` and `$HOME/.config`,
44
-
* on Linuxand MacOS also in `/etc`,
44
+
* on Linux, MacOS and FreeBSD also in `/etc`,
45
45
* on Windows also in the user's profile, `AppData\Local` and `AppData\Roaming` folders,
46
46
47
47
each with an optional `keymapper` subdirectory and finally in the working directory.
@@ -149,6 +149,7 @@ Additionally a `modifier` filter allows to activate blocks depending on the stat
149
149
150
150
Finally blocks can be activated depending on whether two strings match. [Macros](#key-aliases--macros) may be used for generating the strings. e.g.:
151
151
```ini
152
+
# active when environment variable has some specific value
152
153
[getenv["HOSTNAME"] = "LaptopMum"]
153
154
```
154
155
@@ -292,15 +293,22 @@ A !250ms B >> C
292
293
A{!200ms} !200ms A{!200ms} >> D
293
294
```
294
295
295
-
In output expressions it can be used to delay output or keep a key held for a while. e.g:
296
+
In output expressions it can be used to delay output or keep a key held for a while. e.g.:
296
297
297
298
```bash
298
299
A >> B 500ms C{1000ms}
299
300
```
300
301
302
+
:warning: Delaying output also stops the processing of input for the given duration. For pressing and releasing keys asynchronously one has to resort to [keymapperctl](#keymapperctl). e.g.:
Output expressions can contain string literals with characters to type. The typeable characters depend on your keyboard layout. e.g:
311
+
Output expressions can contain string literals with characters to type. The typeable characters depend on your keyboard layout. e.g.:
304
312
305
313
```bash
306
314
AltRight{A} >>'@'
@@ -348,7 +356,7 @@ swap = $0 >> $1; \
348
356
swap[Y, Z]
349
357
```
350
358
351
-
There are a few builtin macros `repeat[EXPR, N]`, `length[STR]`, `default[A, B]`, `apply[EXPR, ARGS...]`, `add/sub/mul/div/mod/min/max[A, B]`which allow to generate mappings and define some more advanced macros. e.g:
359
+
There are a few builtin macros `repeat[EXPR, N]`, `length[STR]`, `default[A, B]`, `apply[EXPR, ARGS...]`, `add/sub/mul/div/mod/min/max[A, B]`, `getenv["VAR"]`which allow to generate mappings and define some more advanced macros. e.g.:
352
360
353
361
```bash
354
362
# when last character of string is typed, undo using backspace and output new string
@@ -522,8 +530,8 @@ It can be run arbitrarily often with one or more of the following arguments:
522
530
--set-config "file" sets a new configuration.
523
531
--is-pressed <key> sets the result code 0 when a virtual key is down.
524
532
--is-released <key> sets the result code 0 when a virtual key is up.
525
-
--press <key> presses a virtual key.
526
-
--release <key> releases a virtual key.
533
+
--press <key> presses a key.
534
+
--release <key> releases a key.
527
535
--toggle <key> toggles a virtual key.
528
536
--wait-pressed <key> waits until a virtual key is pressed.
529
537
--wait-released <key> waits until a virtual key is released.
0 commit comments