Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Aug 10, 2023
1 parent fc18989 commit eddd8f6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 15 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Version 2.7.0] - 2023-08-10

### Added

- Added process path context filter.

### Fixed

- Immediately applying context update on Linux.

## [Version 2.6.1] - 2023-05-07

### Changed

- Preventing mouse button repeat on Windows.
- Made mouse button debouncing optional (keymapperd parameter).

## [Version 2.6.0] - 2023-05-05

### Added
Expand Down Expand Up @@ -266,6 +283,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

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

[version 2.7.0]: https://github.com/houmain/keymapper/compare/2.6.1...2.7.0
[version 2.6.1]: https://github.com/houmain/keymapper/compare/2.6.0...2.6.1
[version 2.6.0]: https://github.com/houmain/keymapper/compare/2.5.0...2.6.0
[version 2.5.0]: https://github.com/houmain/keymapper/compare/2.4.1...2.5.0
[version 2.4.1]: https://github.com/houmain/keymapper/compare/2.4.0...2.4.1
Expand Down
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Control{Q} >> Alt{F4}
Unless overridden using the command line argument `-c`, the configuration is read from `keymapper.conf`, which is looked for in the common places and in the working directory:
* on Linux in `$HOME/.config/` and `/etc/`.
* on Windows in the user's profile, `AppData\Local` and `AppData\Roaming` folders.

The command line argument `-u` causes the configuration to be automatically reloaded whenever the configuration file changes.

:warning: **In case of emergency:** You can always press the special key combination <kbd>Shift</kbd>+<kbd>Escape</kbd>+<kbd>K</kbd> to terminate `keymapperd`.
Expand Down Expand Up @@ -107,26 +107,30 @@ For a detailed description of how the mapping is applied, see the [Functional pr

### Context awareness

Context blocks allow to enable mappings only in specific contexts. A context can be defined by _system_, window _title_ or window _class_. They are opened like:

```bash
[system="Windows" title="..." class="..."]
```

Context blocks allow to enable mappings only in specific contexts. A context can be defined by `system`, the focused window `title`, window `class`, process `path` or the input `device` an event originates from.\
A block continues until the next block (respectively the end of the file). The block which applies in all contexts can be reopened using `default`. e.g.:

```bash
[default]
CapsLock >> Backspace
...

[title="Visual Studio"]
Control{B} >> (Shift Control){B}
...

[system="Linux" class="qtcreator"]
...

[system="Windows" path="notepad.exe"]
...

[device="Some Device Name"]
...
```

The title filter matches windows _containing_ the string in the title, the class filter only matches windows with the _exact_ class name. For finer control [regular expressions](https://en.wikipedia.org/wiki/Regular_expression) can be used. These have to be delimited with slashes. Optionally `i` can be appended to make the comparison case insensitive:
:warning: The device filter is currently only available on Linux and the process path may not be available on Wayland and for applications running as administrator on Windows.

Class and device filters match contexts with the _exact_ same string, others match contexts _containing_ the string.
For finer control [regular expressions](https://en.wikipedia.org/wiki/Regular_expression) can be used. These have to be delimited with slashes. Optionally `i` can be appended to make the comparison case insensitive:

```javascript
[title=/Visual Studio Code|Code OSS/i]
Expand All @@ -139,11 +143,6 @@ Additionally a common `modifier` for all the block's input expressions can be de
K >> ArrowDown # the same as "CapsLock{K} >> ArrowDown"
```

On Linux systems it is also possible to apply mappings when the input originates from a specific device:
```javascript
[device="Some Device Name"]
```

### Abstract commands

To simplify mapping of one input expression to different output expressions, it can be mapped to an abstract command first. The command name can be chosen arbitrarily but must not be a key name. The configuration is case sensitive and all key names start with a capital letter, so it is advisable to begin command names with a lowercase letter:
Expand Down Expand Up @@ -280,6 +279,8 @@ The program is split into two parts:

For security and efficiency reasons, the communication between the two parts is kept as minimal as possible.

The command line argument `-v` can be passed to both processes to output verbose logging information to the console.

### Linux
`keymapperd` should be started as a service and `keymapper` as normal user within an X11 or Wayland session (currently the [GNOME Shell](https://en.wikipedia.org/wiki/GNOME_Shell) and [wlroots-based Wayland compositors](https://wiki.archlinux.org/title/Wayland#Compositors) are supported).

Expand Down

0 comments on commit eddd8f6

Please sign in to comment.