From 735c145c42e6133f78b0f1f2ecce15d98ed768ac Mon Sep 17 00:00:00 2001 From: Tobi Date: Wed, 4 Aug 2021 10:44:48 +0200 Subject: [PATCH] Update development.md --- readme/development.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/readme/development.md b/readme/development.md index ef89b415..d4efe611 100644 --- a/readme/development.md +++ b/readme/development.md @@ -5,6 +5,10 @@ requests. If you have questions about the code and architecture, feel free to [open an issue](https://github.com/sezanzeb/key-mapper/issues). This file should give an overview about some internals of key-mapper. +All pull requests will at some point require unittests, the code +coverage may only be improved, not decreased. It also has to be mostly +compliant with pylint. + ## Roadmap - [x] show a dropdown to select valid devices @@ -205,6 +209,22 @@ line numbers remain valid. This stuff is going on as a daemon in the background +Here is an example how combinations are injected: + +``` +a -> x +a + b -> y +``` + +1. the `a` button is pressed with your finger, `a 1` arrives via evdev in key-mapper +2. key-mapper maps it to `x 1` and injects it +3. `b` is pressed with your finger, `b 1` arrives via evdev in key-mapper +4. key-mapper sees a triggered combination and maps it to `y 1` and injects it +5. `b` is released, `b 0` arrives at key-mapper +6. key-mapper remembered that it was the trigger for a combination and maps that release to `y 0` and injects it +7. the `a` button is released, `a 0` arrives at key-mapper +8. key-mapper maps that release to `x 0` and injects it + ## Resources - [Guidelines for device capabilities](https://www.kernel.org/doc/Documentation/input/event-codes.txt)