Add gamepad mapping example.

This commit is contained in:
Anna Rose Wiggins 2025-07-18 20:43:32 -04:00
parent 751604c60a
commit c355c94b5f
4 changed files with 160 additions and 0 deletions

View file

@ -0,0 +1,46 @@
rules:
- type: axis
input:
device: left-stick
axis: X
output:
device: primary
axis: X
- type: axis
input:
device: left-stick
axis: Y
output:
device: primary
axis: Y
- type: axis
input:
device: right-stick
axis: X
output:
device: primary
axis: RX
- type: axis
input:
device: right-stick
axis: Y
inverted: true
output:
device: primary
axis: RY
- type: axis
input:
device: right-stick
axis: throttle
output:
device: primary
axis: RZ
- type: axis
input:
device: left-stick
axis: throttle
output:
device: primary
axis: Z

View file

@ -0,0 +1,84 @@
rules:
- name: R Red
type: button
input:
device: right-stick
button: BTN_BASE6
output:
device: primary
button: BTN_SOUTH
- name: R Black
type: button
input:
device: right-stick
button: BTN_PINKIE
output:
device: primary
button: BTN_EAST
- name: R Pinkie
type: button
input:
device: right-stick
button: BTN_TRIGGER_HAPPY14
output:
device: primary
button: BTN_TR
- name: R Thumbstick
type: button
input:
device: right-stick
button: BTN_TOP2
output:
device: primary
button: BTN_THUMBR
- name: R Thumb Hat
type: button
input:
device: right-stick
button: BTN_TRIGGER_HAPPY9
output:
device: primary
button: BTN_START
- name: L Red
type: button
input:
device: left-stick
button: BTN_BASE6
output:
device: primary
button: BTN_NORTH
- name: L Black
type: button
input:
device: left-stick
button: BTN_PINKIE
output:
device: primary
button: BTN_WEST
- name: L Pinkie
type: button
input:
device: left-stick
button: BTN_TRIGGER_HAPPY14
output:
device: primary
button: BTN_TL
- name: L Thumbstick
type: button
input:
device: left-stick
button: BTN_TOP2
output:
device: primary
button: BTN_THUMBL
- name: L Thumb Hat
type: button
input:
device: left-stick
button: BTN_TRIGGER_HAPPY9
output:
device: primary
button: BTN_SELECT
# TODO: d-pad needs hat support

View file

@ -0,0 +1,25 @@
devices:
- name: primary
type: virtual
num_axes: 6
buttons:
- BTN_EAST
- BTN_SOUTH
- BTN_NORTH
- BTN_WEST
- BTN_TL
- BTN_TR
- BTN_SELECT
- BTN_START
- BTN_MODE
- BTN_THUMBL
- BTN_THUMBR
- name: right-stick
type: physical
device_name: VIRPIL Controls 20220407 R-VPC Stick MT-50CM2
- name: left-stick
type: physical
device_name: VIRPIL Controls 20220407 L-VPC Stick MT-50CM2
- name: pedals
type: physical
device_name: "CH PRODUCTS CH PRO PEDALS USB "

View file

@ -0,0 +1,5 @@
## joystick -> gamepad mapping
This is an incomplete example for mapping dual flightsticks (Virpil Constellation Alphas) to gamepad outputs, to support dual-joystick play in games that expect a console-style gamepad. This has been tested on Steam, and it successfully recognizes this as a gamepad.
Not every possible input is mapped here, this is just a somewhat minimal example.