A joystick remapper for Linux
Find a file
Anna Rose Wiggins 5b9dfe0967 Support multiple configuration profiles. (#8)
Adds a `--config` command-line option to specify a config directory.

Reviewed-on: #8
Co-authored-by: Anna Rose Wiggins <annabunches@gmail.com>
Co-committed-by: Anna Rose Wiggins <annabunches@gmail.com>
2025-07-18 18:28:11 +00:00
.vscode Add tests for EventBuffer (#7) 2025-07-18 16:42:22 +00:00
cmd Support multiple configuration profiles. (#8) 2025-07-18 18:28:11 +00:00
docs Allow all buttons and axes on virtual devices to be specified by either number or an explicit list. (#5) 2025-07-17 20:04:21 +00:00
internal Fix button indexing. 2025-07-18 12:52:08 -04:00
.gitignore Add stale cleanup function (still WIP) 2025-06-27 13:57:35 -04:00
go.mod Implement axis targets, axis -> button and axis -> relative axis mappings. (#1) 2025-07-15 19:55:19 +00:00
go.sum Implement axis targets, axis -> button and axis -> relative axis mappings. (#1) 2025-07-15 19:55:19 +00:00
readme.md Support multiple configuration profiles. (#8) 2025-07-18 18:28:11 +00:00

Joyful - joystick remapper for Linux

Joyful is a Linux tool for mapping inputs from various joystick-like devices to "virtual" output devices. This is useful when playing games that don't support multiple joysticks, or for games that don't gracefully handle devices changing order (e.g., Star Citizen).

Joyful also allows you to map combinations of physical inputs to a single output, as well as creating other complex scenarios.

Joyful is ideal for Linux gamers who enjoy space and flight sims and miss the features of Joystick Gremlin.

Features

Current Features

  • Create virtual devices with up to 8 axes and 74 buttons.
  • Flexible rule system that allows several different types of rules, including:
    • Simple 1:1 mappings of buttons and axes: Button1 -> VirtualButtonA
    • Combination mappings: Button1 + Button2 -> VirtualButtonA
    • "Split" axis mapping: map sections of an axis to different outputs using deadzones.
    • Axis -> button mapping with optional "proportional" repeat speed (i.e. repeat faster as the axis is engaged further)
    • Axis -> Relative Axis mapping, for converting a joystick axis to mouse movement and scrollwheel events.
  • Define multiple modes with per-mode behavior.
  • Configure per-rule configurable deadzones for axes.

Possible Future Features

  • Macros - have a single input produce a sequence of button presses with configurable pauses.
  • Sequence combos - Button1, Button2, Button3 -> VirtualButtonA
  • Output keyboard button presses
  • Hat support
  • HIDRAW support for more button options.
  • Percentage-based deadzones.
  • Sensitivity Curves.

Configuration

Configuration is handled via YAML files in ~/.config/joyful/. Joyful will read every yaml file in this directory and combine them, so you can split your configuration up however you like.

A configuration guide and examples can be found in the docs/ directory.

Configuration can be fairly complicated and repetitive. If anyone wants to create a graphical interface to configure Joyful, we would love to link to it here.

Usage

After building (see below) and writing your configuration (see above), just run joyful. (Feel free to move this somewhere in your path. You can use --config <directory> to specify different configuration profiles.

Technical details

Joyful is written in golang, and uses evdev/uinput to manage devices.

Build & Install

To build joyful, install go via your package manager, then run:

CGO_ENABLED=0 go build -o build/ ./...

Copy the binaries in the build/ directory to somewhere in your $PATH. (details depend on your setup, but typically somewhere like /usr/local/bin or ~/bin)

Contributing

Send patches and questions to annabunches@gmail.com. Make sure the subject of your email starts with [Joyful].

If enough people show an interest in contributing, I'll consider mirroring the repository on Github.