Skip to content

Commit 07ab4d3

Browse files
committed
Preparing release
1 parent cfd6861 commit 07ab4d3

3 files changed

Lines changed: 35 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

6+
## [Version 5.4.0] - 2026-03-01
7+
8+
### Added
9+
10+
- Added FreeBSD support ([#222](https://github.com/houmain/keymapper/issues/222)).
11+
- Allow `keymapperctl` to press/release non-virtual keys ([#348](https://github.com/houmain/keymapper/issues/348)).
12+
- Added `getenv` builtin macro and string comparison blocks ([#334](https://github.com/houmain/keymapper/issues/334)). .e.g.:
13+
14+
```ini
15+
# activate context when environment variable has some specific value
16+
[getenv["HOSTNAME"] = "LaptopMum"]
17+
```
18+
19+
- Added window title change detection to KWin script ([#349](https://github.com/houmain/keymapper/issues/349)).
20+
21+
- Improved version mismatch error dialog on Windows.
22+
23+
624
## [Version 5.3.2] - 2026-02-07
725

826
### Changed
@@ -1085,6 +1103,7 @@ The reason for the major version number increment is mainly because of the chang
10851103

10861104
## [Version 1.1.5] - 2020-05-09
10871105

1106+
[version 5.4.0]: https://github.com/houmain/keymapper/compare/5.3.2...5.4.0
10881107
[version 5.3.2]: https://github.com/houmain/keymapper/compare/5.3.1...5.3.2
10891108
[version 5.3.1]: https://github.com/houmain/keymapper/compare/5.3.0...5.3.1
10901109
[version 5.3.0]: https://github.com/houmain/keymapper/compare/5.2.0...5.3.0

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A cross-platform context-aware key remapper. It allows to:
2121
* Redefine your keyboard layout and shortcuts systemwide or per application.
2222
* Manage all your keyboard shortcuts in a single configuration file.
2323
* 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).
2525
* Specify input and output as [characters](#character-typing) instead of the keys required to type them.
2626
* Bind keyboard shortcuts to [launch applications](#application-launching).
2727
* Control the state from external applications using [keymapperctl](#keymapperctl).
@@ -41,7 +41,7 @@ Control{Q} >> Alt{F4}
4141

4242
Unless overridden using the command line argument `-c`, the configuration is read from `keymapper.conf`, which is looked for in the common places:
4343
* on all systems in `$XDG_CONFIG_HOME` and `$HOME/.config`,
44-
* on Linux and MacOS also in `/etc`,
44+
* on Linux, MacOS and FreeBSD also in `/etc`,
4545
* on Windows also in the user's profile, `AppData\Local` and `AppData\Roaming` folders,
4646

4747
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
149149

150150
Finally blocks can be activated depending on whether two strings match. [Macros](#key-aliases--macros) may be used for generating the strings. e.g.:
151151
```ini
152+
# active when environment variable has some specific value
152153
[getenv["HOSTNAME"] = "LaptopMum"]
153154
```
154155

@@ -292,15 +293,22 @@ A !250ms B >> C
292293
A{!200ms} !200ms A{!200ms} >> D
293294
```
294295

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.:
296297

297298
```bash
298299
A >> B 500ms C{1000ms}
299300
```
300301

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.:
303+
304+
```bash
305+
# keep mouse button held for 5 seconds
306+
Meta{Space} >> $(keymapperctl --press ButtonLeft --wait 5000 --release ButtonLeft)
307+
```
308+
301309
### Character typing
302310

303-
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.:
304312

305313
```bash
306314
AltRight{A} >> '@'
@@ -348,7 +356,7 @@ swap = $0 >> $1; \
348356
swap[Y, Z]
349357
```
350358

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.:
352360

353361
```bash
354362
# 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:
522530
--set-config "file" sets a new configuration.
523531
--is-pressed <key> sets the result code 0 when a virtual key is down.
524532
--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.
527535
--toggle <key> toggles a virtual key.
528536
--wait-pressed <key> waits until a virtual key is pressed.
529537
--wait-released <key> waits until a virtual key is released.

src/client/ClientState.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ catch (...) {
295295
}
296296

297297
bool ClientState::on_inject_output_message(KeyEvent event) {
298-
return m_server.send_inject_output({ event });
298+
return m_server.send_inject_output(replace_logical_keys({ event }));
299299
}
300300

301301
bool ClientState::on_notify_message(const std::string& string) {

0 commit comments

Comments
 (0)