Turns your input devices into joysticks by converting relative axes into absolute ones.
C CMake
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
conf
src
.gitignore
CMakeLists.txt
LICENSE
README.md
udev.rules

README.md

relabsd

Turns your input devices into joysticks by converting relative axes into absolute ones.

Use cases

  • Use a relative input device as a joystick.
  • Bypass an issue causing your device to report its axis are relative when they are absolutes (see the wiki page on 3DConnexion devices for example), this can be required by some librairies (such as Simple DirectMedial Layer - SDL) for your device to be recognized.

Dependencies

  • CMake (>= 3.0)
  • libevdev

How to use

See the related wiki page on how to set up relabsd, and the one on how to create a virtual device.

Results

(Using Grumpel's sdl-jstest)

Note that the real device (a 3Dconnexion SpaceNavigator, that's a 6DOF device) was made to report itself as being a joystick so it could be see by SDL. This is not required (only the virtual device has to).

SDL 1:

$ ./sdl-jstest --list
Found 1 joystick(s)

Joystick Name:     'relabsd: 3Dconnexion SpaceNavigator'
Joystick Number:    0
Number of Axes:     6
Number of Buttons:  2
Number of Hats:     0
Number of Balls:    0

SDL 2:

$ ./sdl2-jstest --list
Found 2 joystick(s)

Joystick Name:     '3Dconnexion SpaceNavigator'
Joystick GUID:     030000006d04000026c6000011010000
Joystick Number:    0
Number of Axes:     0
Number of Buttons:  2
Number of Hats:     0
Number of Balls:    1
GameController:
  not a gamepad

Joystick Name:     'relabsd: 3Dconnexion SpaceNavigator'
Joystick GUID:     030000006d04000026c6000011010000
Joystick Number:    1
Number of Axes:     6
Number of Buttons:  2
Number of Hats:     0
Number of Balls:    0
GameController:
  not a gamepad

Troubleshooting

I can't find my (real) input device.

Your input device should be listed in /dev/input.

If you are using a 3DConnexion device and not finding it in /dev/input, read this wiki page.