Some example updates.
This commit is contained in:
parent
5a2e9f354b
commit
4ff4757abc
6 changed files with 90 additions and 70 deletions
56
examples/multiple_files/axes.yml
Normal file
56
examples/multiple_files/axes.yml
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
rules:
|
||||||
|
- type: simple
|
||||||
|
input:
|
||||||
|
device: right-stick
|
||||||
|
axis: ABS_X
|
||||||
|
output:
|
||||||
|
device: main
|
||||||
|
axis: ABS_X
|
||||||
|
|
||||||
|
- type: simple
|
||||||
|
input:
|
||||||
|
device: right-stick
|
||||||
|
axis: ABS_Y
|
||||||
|
output:
|
||||||
|
device: main
|
||||||
|
axis: ABS_Y
|
||||||
|
|
||||||
|
- type: simple
|
||||||
|
input:
|
||||||
|
device: right-stick
|
||||||
|
axis: ABS_THROTTLE
|
||||||
|
output:
|
||||||
|
device: main
|
||||||
|
axis: ABS_THROTTLE
|
||||||
|
|
||||||
|
- type: simple
|
||||||
|
input:
|
||||||
|
device: left-stick
|
||||||
|
axis: ABS_X
|
||||||
|
output:
|
||||||
|
device: main
|
||||||
|
axis: ABS_RX
|
||||||
|
|
||||||
|
- type: simple
|
||||||
|
input:
|
||||||
|
device: left-stick
|
||||||
|
axis: ABS_Y
|
||||||
|
output:
|
||||||
|
device: main
|
||||||
|
axis: ABS_RY
|
||||||
|
|
||||||
|
- type: simple
|
||||||
|
input:
|
||||||
|
device: left-stick
|
||||||
|
axis: ABS_THROTTLE
|
||||||
|
output:
|
||||||
|
device: main
|
||||||
|
axis: ABS_RUDDER
|
||||||
|
|
||||||
|
- type: simple
|
||||||
|
input:
|
||||||
|
device: pedals
|
||||||
|
axis: ABS_Z
|
||||||
|
output:
|
||||||
|
device: main
|
||||||
|
axis: ABS_Z
|
21
examples/multiple_files/buttons.yml
Normal file
21
examples/multiple_files/buttons.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
rules:
|
||||||
|
- name: Trigger
|
||||||
|
type: combo
|
||||||
|
inputs:
|
||||||
|
- device: right-stick
|
||||||
|
button: BTN_THUMB
|
||||||
|
- device: right-stick
|
||||||
|
button: BTN_THUMB2
|
||||||
|
output:
|
||||||
|
device: main
|
||||||
|
button: BTN_TRIGGER
|
||||||
|
- name: Trigger2
|
||||||
|
type: combo
|
||||||
|
inputs:
|
||||||
|
- device: left-stick
|
||||||
|
button: BTN_THUMB
|
||||||
|
- device: left-stick
|
||||||
|
button: BTN_THUMB2
|
||||||
|
output:
|
||||||
|
device: main
|
||||||
|
button: BTN_THUMB
|
|
@ -9,3 +9,9 @@ devices:
|
||||||
- name: left-stick
|
- name: left-stick
|
||||||
type: physical
|
type: physical
|
||||||
device_name: VIRPIL Controls 20220407 L-VPC Stick MT-50CM2
|
device_name: VIRPIL Controls 20220407 L-VPC Stick MT-50CM2
|
||||||
|
- name: pedals
|
||||||
|
type: physical
|
||||||
|
device_name: "CH PRODUCTS CH PRO PEDALS USB "
|
||||||
|
- name: button-box
|
||||||
|
type: physical
|
||||||
|
device_name: Arduino Arduino Joystick
|
7
examples/multiple_files/readme.md
Normal file
7
examples/multiple_files/readme.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
## multi-file configuration example
|
||||||
|
|
||||||
|
This directory demonstrates how to split your configuration across multiple files.
|
||||||
|
Note that we re-define the top-level `rules` element; this is by design.
|
||||||
|
|
||||||
|
It also serves as a real-world example demonstrating many of the available features of the system.
|
||||||
|
It is based on the author's actual mappings for Star Citizen.
|
|
@ -1,70 +0,0 @@
|
||||||
rules:
|
|
||||||
# A simple 1:1 mapping of 2 inputs
|
|
||||||
- name: basic mapping
|
|
||||||
type: simple
|
|
||||||
input:
|
|
||||||
device: right-stick
|
|
||||||
button: BTN_BASE6
|
|
||||||
output:
|
|
||||||
device: main
|
|
||||||
button: BTN_BASE6
|
|
||||||
# A couple of axis mappings
|
|
||||||
- name: x axis
|
|
||||||
type: simple
|
|
||||||
input:
|
|
||||||
device: right-stick
|
|
||||||
axis: ABS_X
|
|
||||||
output:
|
|
||||||
device: main
|
|
||||||
axis: ABS_X
|
|
||||||
- name: y axis
|
|
||||||
type: simple
|
|
||||||
input:
|
|
||||||
device: right-stick
|
|
||||||
axis: ABS_Y
|
|
||||||
output:
|
|
||||||
device: main
|
|
||||||
axis: ABS_Y
|
|
||||||
# 3-stage trigger for a VPC Constellation Alpha
|
|
||||||
# This only sends a trigger input when the
|
|
||||||
# flip trigger is pulled all the way in *and* the inner trigger
|
|
||||||
# is activated
|
|
||||||
- name: 3 stage trigger
|
|
||||||
type: combo
|
|
||||||
inputs:
|
|
||||||
- device: right-stick
|
|
||||||
button: BTN_TRIGGER
|
|
||||||
inverted: true
|
|
||||||
- device: right-stick
|
|
||||||
button: BTN_THUMB
|
|
||||||
- device: right-stick
|
|
||||||
button: BTN_THUMB2
|
|
||||||
output:
|
|
||||||
device: main
|
|
||||||
button: BTN_TRIGGER
|
|
||||||
# Of course, BTN_TRIGGER above is unnecessary, because on the Constellation Alpha
|
|
||||||
# it's impossible to press BTN_THUMB without disabling BTN_TRIGGER. So this is a
|
|
||||||
# simpler form of the same rule for the left stick
|
|
||||||
- name: 2 stage trigger
|
|
||||||
type: combo
|
|
||||||
inputs:
|
|
||||||
- device: left-stick
|
|
||||||
button: BTN_THUMB
|
|
||||||
- device: left-stick
|
|
||||||
button: BTN_THUMB2
|
|
||||||
output:
|
|
||||||
device: main
|
|
||||||
button: BTN_THUMB
|
|
||||||
# You can use the same input in multiple rules. Be careful with this!
|
|
||||||
# In this example we use the same 2-stage guard, but trigger an additional output
|
|
||||||
# when the final stage of the VPC's trigger is depressed
|
|
||||||
- name: alternate 2 stage trigger
|
|
||||||
type: combo
|
|
||||||
inputs:
|
|
||||||
- device: left-stick
|
|
||||||
button: BTN_THUMB
|
|
||||||
- device: left-stick
|
|
||||||
button: BTN_TOP
|
|
||||||
output:
|
|
||||||
device: main
|
|
||||||
button: BTN_THUMB2
|
|
Loading…
Add table
Add a link
Reference in a new issue