From 2f9e8635f89a0e7f6990fee467d89ff2df4197c9 Mon Sep 17 00:00:00 2001 From: "Derek J. Clark" Date: Fri, 16 Aug 2024 15:59:11 -0700 Subject: [PATCH] fix(OneXPlayer X1): Add OneXPlayer X1 series. --- .../capability_maps/onexplayer_type5.yaml | 34 +++++++++++ .../devices/50-onexplayer_x1.yaml | 57 +++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 rootfs/usr/share/inputplumber/capability_maps/onexplayer_type5.yaml create mode 100644 rootfs/usr/share/inputplumber/devices/50-onexplayer_x1.yaml diff --git a/rootfs/usr/share/inputplumber/capability_maps/onexplayer_type5.yaml b/rootfs/usr/share/inputplumber/capability_maps/onexplayer_type5.yaml new file mode 100644 index 0000000..fa0afc8 --- /dev/null +++ b/rootfs/usr/share/inputplumber/capability_maps/onexplayer_type5.yaml @@ -0,0 +1,34 @@ +# 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: OneXPlayer Type 5 + +# Unique identifier of the capability mapping +id: oxp5 + +# List of mapped events that are activated by a specific set of activation keys. +mapping: + - name: Turbo + source_events: + - keyboard: KeyLeftCtrl + - keyboard: KeyLeftAlt + - keyboard: KeyLeftMeta + target_event: + gamepad: + button: Keyboard + - name: QuickAccess # this model uses the kb button for this + source_events: + - keyboard: KeyRightCtrl + - keyboard: KeyLeftMeta + - keyboard: KeyO + target_event: + gamepad: + button: QuickAccess + +# List of events to filter from the source devices +filtered_events: [] diff --git a/rootfs/usr/share/inputplumber/devices/50-onexplayer_x1.yaml b/rootfs/usr/share/inputplumber/devices/50-onexplayer_x1.yaml new file mode 100644 index 0000000..720bd05 --- /dev/null +++ b/rootfs/usr/share/inputplumber/devices/50-onexplayer_x1.yaml @@ -0,0 +1,57 @@ +# 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: ONEXPLAYER X1 + +# Only allow a single source device per composite device of this type. +single_source: false + +# 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: + - dmi_data: + product_name: ONEXPLAYER X1 A + sys_vendor: ONE-NETBOOK + - dmi_data: + product_name: ONEXPLAYER X1 i + sys_vendor: ONE-NETBOOK + - dmi_data: + product_name: ONEXPLAYER X1 mini + sys_vendor: ONE-NETBOOK + +# 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 + evdev: + name: Microsoft X-Box 360 pad + phys_path: usb-0000:c4:00.3-4/input0 + handler: event* + - group: keyboard + evdev: + name: AT Translated Set 2 keyboard + phys_path: isa0060/serio0/input0 + handler: event* + - group: keyboard + evdev: + name: HID 1a86:fe00 + phys_path: usb-0000:c4:00.3-2.2/input0 + handler: event* + - group: imu + iio: + name: i2c-BMI0260:00 + +# The target input device(s) that the virtual device profile can use +target_devices: + - xb360 + - mouse + - keyboard + +# The ID of a device event mapping in the 'event_maps' folder +capability_map_id: oxp5