42 lines
1.8 KiB
Markdown
42 lines
1.8 KiB
Markdown
# sol-r1-linux-game-mappings
|
|
|
|
Custom input mappings for the Thrustmaster Sol-R1 HOTAS (grip + base)
|
|
on Linux (Arch/Hyprland), without Windows/T.A.R.G.E.T. Built on
|
|
[joyful](https://aur.archlinux.org/packages/joyful), a Go-based Linux
|
|
joystick remapper that turns physical Sol-R1 input into a virtual
|
|
gamepad via YAML rules.
|
|
|
|
## Layout
|
|
|
|
- `find_codes.py` - shared diagnostic tool. Run against the physical
|
|
hardware first, for any game, to get real evdev `BTN_*`/`ABS_*`
|
|
codes to fill into that game's config.
|
|
- `template/` - starting point for mapping a new game: a bare
|
|
passthrough joyful config (stick behaves normally, nothing remapped
|
|
yet), a template Steam launch-options wrapper, and a template
|
|
stateful input-converter daemon for controls that need game-state
|
|
feedback (real on/off switches mapped to a game's stateless toggle
|
|
key). See `template/README.md`.
|
|
- `<game>/` - one folder per game, each self-contained (its own
|
|
joyful config, launch wrapper, and daemon + config if it needs one).
|
|
Currently:
|
|
- `space-engineers/`
|
|
|
|
## Adding a new game
|
|
|
|
Copy `template/` to `<game-name>/` and follow `template/README.md`.
|
|
|
|
## Why a daemon at all
|
|
|
|
joyful is stateless - it has no idea what's happening in the game, so
|
|
it can only pass a control through or remap it. That's fine for
|
|
buttons, triggers, and continuous axes. It breaks down for a real
|
|
physical on/off switch mapped to a game action that's only exposed as
|
|
a stateless "press to toggle" key: the switch position can silently
|
|
drift out of sync with the game's actual state. Where that happens, a
|
|
small per-game daemon polls both the physical switch and the game's
|
|
actual state (usually by sampling a HUD pixel via `grim`, absent a
|
|
better signal) and only sends a correction keypress when they
|
|
disagree. See `template/input_converter_daemon.py` and
|
|
`space-engineers/switch_sync.py` for a worked example.
|