From 5b80145ebbafb17a5df1eab36a822376e07f4ff0 Mon Sep 17 00:00:00 2001 From: winghugs Date: Wed, 2 Apr 2025 03:48:52 -0700 Subject: [PATCH 1/6] added vader 4 pro support (HAPPY11-13) --- .../capability_maps/flydigi_vader_4_pro.yaml | 68 +++++++++++++++++++ .../devices/50-flydigi_vader_4_pro.yaml | 40 +++++++++++ src/input/event/evdev.rs | 3 + 3 files changed, 111 insertions(+) create mode 100644 rootfs/usr/share/inputplumber/capability_maps/flydigi_vader_4_pro.yaml create mode 100644 rootfs/usr/share/inputplumber/devices/50-flydigi_vader_4_pro.yaml diff --git a/rootfs/usr/share/inputplumber/capability_maps/flydigi_vader_4_pro.yaml b/rootfs/usr/share/inputplumber/capability_maps/flydigi_vader_4_pro.yaml new file mode 100644 index 00000000..fe5db74d --- /dev/null +++ b/rootfs/usr/share/inputplumber/capability_maps/flydigi_vader_4_pro.yaml @@ -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: Press + touchmotion: + region: top + speed_pps: 800 + - name: RightPaddle3 + source_events: + - gamepad: + button: LeftPaddle2 + target_event: + touchpad: + name: RightPad + touch: + button: Press + #touchmotion: + # region: top + # speed_pps: 800 +# List of events to filter from the source devices +filtered_events: [] diff --git a/rootfs/usr/share/inputplumber/devices/50-flydigi_vader_4_pro.yaml b/rootfs/usr/share/inputplumber/devices/50-flydigi_vader_4_pro.yaml new file mode 100644 index 00000000..999f4e53 --- /dev/null +++ b/rootfs/usr/share/inputplumber/devices/50-flydigi_vader_4_pro.yaml @@ -0,0 +1,40 @@ +# 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: 4 + +# 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 + hidraw: + vendor_id: 0x045e + product_id: 0x028e + - group: gamepad + evdev: + vendor_id: "045e" + product_id: "028e" + handler: event* + +# 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 diff --git a/src/input/event/evdev.rs b/src/input/event/evdev.rs index ede50f53..1eaaa66d 100644 --- a/src/input/event/evdev.rs +++ b/src/input/event/evdev.rs @@ -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)) } From deaabb6d8aca3ae0fac22a5fb6194be8cf1d5f79 Mon Sep 17 00:00:00 2001 From: winghugs Date: Wed, 2 Apr 2025 04:40:03 -0700 Subject: [PATCH 2/6] added more specific detection for flydigi vader 4 pro --- .../devices/60-flydigi_vader_4_pro.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml diff --git a/rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml b/rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml new file mode 100644 index 00000000..466e1abf --- /dev/null +++ b/rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml @@ -0,0 +1,37 @@ +# 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: 4 + +# 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" + subsystem: usb + +# 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 From 59494815603a9028cc1da9203fe61af17cc2f376 Mon Sep 17 00:00:00 2001 From: winghugs Date: Wed, 2 Apr 2025 04:41:40 -0700 Subject: [PATCH 3/6] rename config --- .../devices/50-flydigi_vader_4_pro.yaml | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 rootfs/usr/share/inputplumber/devices/50-flydigi_vader_4_pro.yaml diff --git a/rootfs/usr/share/inputplumber/devices/50-flydigi_vader_4_pro.yaml b/rootfs/usr/share/inputplumber/devices/50-flydigi_vader_4_pro.yaml deleted file mode 100644 index 999f4e53..00000000 --- a/rootfs/usr/share/inputplumber/devices/50-flydigi_vader_4_pro.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# 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: 4 - -# 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 - hidraw: - vendor_id: 0x045e - product_id: 0x028e - - group: gamepad - evdev: - vendor_id: "045e" - product_id: "028e" - handler: event* - -# 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 From c50134f105c25d861e1baadd5d95a8e551ce6bf2 Mon Sep 17 00:00:00 2001 From: winghugs Date: Wed, 2 Apr 2025 04:47:40 -0700 Subject: [PATCH 4/6] fix flydigi controller specific detection --- .../usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml b/rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml index 466e1abf..d970f5f5 100644 --- a/rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml +++ b/rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml @@ -24,7 +24,8 @@ source_devices: properties: - name: ID_MODEL value: "Flydigi_VADER4" - subsystem: usb + sys_name: "event*" + subsystem: input # The target input device(s) that the virtual device profile can use target_devices: From 95eacff1f7e94c934e9dda16e55fa4c1d602b16d Mon Sep 17 00:00:00 2001 From: winghugs Date: Wed, 2 Apr 2025 04:53:18 -0700 Subject: [PATCH 5/6] only catch one source --- .../usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml b/rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml index d970f5f5..6432e563 100644 --- a/rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml +++ b/rootfs/usr/share/inputplumber/devices/60-flydigi_vader_4_pro.yaml @@ -14,7 +14,7 @@ name: flydigi-vader-4-pro matches: [] # Only allow a single source device per composite device of this type. -maximum_sources: 4 +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. From 07efa2f67c053e346bba8009eaac2b92763e8699 Mon Sep 17 00:00:00 2001 From: winghugs Date: Wed, 2 Apr 2025 14:42:38 -0700 Subject: [PATCH 6/6] fix touchpad mapping --- .../capability_maps/flydigi_vader_4_pro.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rootfs/usr/share/inputplumber/capability_maps/flydigi_vader_4_pro.yaml b/rootfs/usr/share/inputplumber/capability_maps/flydigi_vader_4_pro.yaml index fe5db74d..92bd9e18 100644 --- a/rootfs/usr/share/inputplumber/capability_maps/flydigi_vader_4_pro.yaml +++ b/rootfs/usr/share/inputplumber/capability_maps/flydigi_vader_4_pro.yaml @@ -48,9 +48,9 @@ mapping: touchpad: name: LeftPad touch: - button: Press - touchmotion: - region: top + button: Touch + motion: + region: top-left speed_pps: 800 - name: RightPaddle3 source_events: @@ -60,9 +60,9 @@ mapping: touchpad: name: RightPad touch: - button: Press - #touchmotion: - # region: top - # speed_pps: 800 + button: Touch + motion: + region: top-left + speed_pps: 800 # List of events to filter from the source devices filtered_events: []