aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/evdev.md
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-08-01 20:54:17 +0200
committercbdev <cb@cbcdn.com>2019-08-01 20:54:17 +0200
commita23ce7718ab61e73586d2738329d6bbace0b764b (patch)
treeaf922cd4801b299067d0b871b687de6474a4d4e6 /backends/evdev.md
parent4e604b493e0dc855b6ea6978e5cf8e2de5d2b8d5 (diff)
downloadmidimonster-a23ce7718ab61e73586d2738329d6bbace0b764b.tar.gz
midimonster-a23ce7718ab61e73586d2738329d6bbace0b764b.tar.bz2
midimonster-a23ce7718ab61e73586d2738329d6bbace0b764b.zip
Implement evdev relative axis inversion
Diffstat (limited to 'backends/evdev.md')
-rw-r--r--backends/evdev.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/backends/evdev.md b/backends/evdev.md
index 995b44c..88dfc85 100644
--- a/backends/evdev.md
+++ b/backends/evdev.md
@@ -38,12 +38,18 @@ If an axis is not used for output, this configuration can be omitted.
For real devices, all of these parameters for every axis can be found by running `evtest` on the device.
To use the input from relative axes in absolute-value based protocols, the backend needs a reference frame to
-convert the relative movements to absolute values.
+convert the relative movements to absolute values. To invert the mapping of the relative axis, specify the `max` value
+as a negative number, for example:
+
+```
+relaxis.REL_X = -1024 512
+```
If relative axes are used without specifying their extents, the channel will generate normalized values
of `0`, `0.5` and `1` for any input less than, equal to and greater than `0`, respectively. As for output, only
the values `-1`, `0` and `1` are generated for the same interval.
+
#### Channel specification
A channel is specified by its event type and event code, separated by `.`. For a complete list of event types and codes