Skip to content
Nathanaël Sensfelder edited this page Aug 1, 2020 · 5 revisions
  • Syntax based on /etc/fstab.
  • Empty lines are ignored/allowed.
  • Spaces at the beginning of a line are ignored/allowed.
  • A line is either a comment or an axis descriptor (you can't have both on the same line).
  • Comments start with a '#'.
  • You can specify a timeout with an TO VALUE line (e.g. TO 45), to indicate that all axes should be set to zero if no input has been detected in the last VALUE milliseconds.
  • An (absolute) axis is described by: AXIS_CODE MIN_VALUE MAX_VALUE FUZZ FLAT RESOLUTION OPTIONS
  • All parameters are enforced by relabsd to prevent incoherent events. The only exception is RESOLUTION, because I don't know what its expected effect is.

AXIS_CODE

  • The supported values are X, Y, Z, RX (X rotation), RY, RZ, WL (wheel), MC (misc).

MIN_VALUE, MAX_VALUE

  • The lowest/highest value that can be sent by the emulated device.
  • Integer.

FUZZ

  • Noise threshold. If the difference between two consecutive events is lower, the latter is discarded.
  • Behavior affected by the real_fuzz option.
  • Integer.

FLAT

  • The range in which all events values should be considered as zero.
  • Note: SDL's reaction to this parameter can be surprising it seems to reduce the absolute value of the event by FLAT, which does indeed create a deadzone, but also prevents the events to reach MIN_VALUE or MAX_VALUE.\

RESOLUTION

  • Added to the virtual device's configuration but not enforced, because I don't know what to do with it.

OPTIONS

  • Separated by ,, no whitespaces.
  • If an option accepts a value, it is to be set like so option_name=value.
  • Available options (set, not set):
    • direct: take the value of the relative events directly, recommended for devices that erroneously describe themselves as 'relative' despite giving 'absolute' values.
    • direct: use the relative events as displacements and send the value that results from making that displacement from the previously sent value. In effect, this simulates an 'origin point' and use the current distance to this 'origin point', which is pretty much the definition of an 'absolute' axis.
    • framed (ignored if direct): the simulated distance to the 'origin point' is restricted by MIN_VALUE and MAX_VALUE. This ensures that any 'simulated distance' can be an 'emitted value'.
    • framed (ignored if direct): the simulated distance to the 'origin point' can go beyond MIN_VALUE and MAX_VALUE, in which case the closest extremum is used as an value (be careful not to get lost). It'll probably accept a value in the future, to limit how far you can go beyond the extrema.
    • real_fuzz: the 'fuzz' parameter is applied to the inputs of the real device.
    • real_fuzz: the 'fuzz' parameter is applied to the inputs of the simulated device.
    • convert_to=AXIS_CODE: Events for this axis are output to that axis instead.
    • not_abs: the events stay relative. The axis also ignore everything but the convert_to and invert options.
    • invert: input values are inverted prior to being considered.
Clone this wiki locally