Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v1.json
# Schema version number
version: 1
# The type of configuration schema
kind: CapabilityMap

# Name for the device event map
name: flydigi-vader-4-pro

# Unique identifier of the capability mapping
id: flydigi-vader-4-pro

# List of mapped events that are activated by a specific set of activation keys.
mapping:
- name: LeftPaddle1
source_events:
- gamepad:
button: RightPaddle3
target_event:
gamepad:
button: LeftPaddle1
- name: LeftPaddle2
source_events:
- gamepad:
button: LeftPaddle3
target_event:
gamepad:
button: LeftPaddle2
- name: RightPaddle1
source_events:
- gamepad:
button: RightPaddle2
target_event:
gamepad:
button: RightPaddle1
- name: RightPaddle2
source_events:
- gamepad:
button: RightPaddle1
target_event:
gamepad:
button: RightPaddle2
- name: LeftPaddle3
source_events:
- gamepad:
button: LeftPaddle1
target_event:
touchpad:
name: LeftPad
touch:
button: Touch
motion:
region: top-left
speed_pps: 800
- name: RightPaddle3
source_events:
- gamepad:
button: LeftPaddle2
target_event:
touchpad:
name: RightPad
touch:
button: Touch
motion:
region: top-left
speed_pps: 800
# List of events to filter from the source devices
filtered_events: []
38 changes: 38 additions & 0 deletions rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/composite_device_v1.json
# Schema version number
version: 1

# The type of configuration schema
kind: CompositeDevice

# Name of the composite device mapping
name: flydigi-vader-4-pro

# Only use this profile if *any* of the given matches matches. If this list is
# empty,then the source devices will *always* be checked.
# /sys/class/dmi/id/product_name
matches: []

# Only allow a single source device per composite device of this type.
maximum_sources: 1

# One or more source devices to combine into a single virtual device. The events
# from these devices will be watched and translated according to the key map.
source_devices:
- group: gamepad
udev:
properties:
- name: ID_MODEL
value: "Flydigi_VADER4"
sys_name: "event*"
subsystem: input

# The target input device(s) that the virtual device profile can use
target_devices:
- deck
- touchpad

capability_map_id: flydigi-vader-4-pro

options:
auto_manage: true
3 changes: 3 additions & 0 deletions src/input/event/evdev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ impl EvdevEvent {
KeyCode::BTN_TRIGGER_HAPPY8 => Capability::Gamepad(Gamepad::Button(GamepadButton::LeftPaddle2)),
KeyCode::BTN_TRIGGER_HAPPY9 => Capability::Gamepad(Gamepad::Button(GamepadButton::RightPaddle3)),
KeyCode::BTN_TRIGGER_HAPPY10 => Capability::Gamepad(Gamepad::Button(GamepadButton::LeftPaddle3)),
KeyCode::BTN_TRIGGER_HAPPY11 => Capability::Gamepad(Gamepad::Button(GamepadButton::RightPaddle1)),
KeyCode::BTN_TRIGGER_HAPPY12 => Capability::Gamepad(Gamepad::Button(GamepadButton::RightPaddle2)),
KeyCode::BTN_TRIGGER_HAPPY13 => Capability::Gamepad(Gamepad::Button(GamepadButton::QuickAccess)),
KeyCode::BTN_THUMBL => {
Capability::Gamepad(Gamepad::Button(GamepadButton::LeftStick))
}
Expand Down