diff --git a/rootfs/usr/share/inputplumber/capability_maps/onexplayer_type9.yaml b/rootfs/usr/share/inputplumber/capability_maps/onexplayer_type9.yaml new file mode 100644 index 000000000..51d581034 --- /dev/null +++ b/rootfs/usr/share/inputplumber/capability_maps/onexplayer_type9.yaml @@ -0,0 +1,48 @@ +# 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 9 + +# Unique identifier of the capability mapping +id: oxp9 + +# List of mapped events that are activated by a specific set of activation keys. +mapping: + - name: Home Short Press + source_events: + - keyboard: KeyF13 + target_event: + gamepad: + button: Guide + - name: Home Long Press + source_events: + - keyboard: KeyF14 + target_event: + gamepad: + button: Guide + - name: Turbo + source_events: + - keyboard: KeyF15 + target_event: + gamepad: + button: QuickAccess + + - name: Brightness Up -> R4 (Steam Deck right back paddle) + source_events: + - keyboard: KeyBrightnessUp + target_event: + gamepad: + button: RightPaddle1 + - name: Brightness Down -> L4 (Steam Deck left back paddle) + source_events: + - keyboard: KeyBrightnessDown + target_event: + gamepad: + button: LeftPaddle1 +# List of events to filter from the source devices +filtered_events: [] diff --git a/rootfs/usr/share/inputplumber/devices/50-onexplayer_g1.yaml b/rootfs/usr/share/inputplumber/devices/50-onexplayer_g1_a_8840.yaml similarity index 93% rename from rootfs/usr/share/inputplumber/devices/50-onexplayer_g1.yaml rename to rootfs/usr/share/inputplumber/devices/50-onexplayer_g1_a_8840.yaml index f48a34d09..2cc4313e0 100644 --- a/rootfs/usr/share/inputplumber/devices/50-onexplayer_g1.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-onexplayer_g1_a_8840.yaml @@ -15,12 +15,10 @@ single_source: false # empty, then the source devices will *always* be checked. # /sys/class/dmi/id/product_name matches: - - dmi_data: - product_name: ONEXPLAYER G1 i - sys_vendor: ONE-NETBOOK - dmi_data: product_name: ONEXPLAYER G1 A sys_vendor: ONE-NETBOOK + cpu_model: AMD Ryzen 7 8840U w/ Radeon 780M Graphics # 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. @@ -32,14 +30,17 @@ source_devices: handler: event* - group: keyboard evdev: - name: AT Translated Set 2 keyboard - phys_path: isa0060/serio0/input0 + name: AMIRA-KEYBOAR USB KEYBOARD + phys_path: usb-0000:00:14.0-6/input0 handler: event* - group: keyboard evdev: - name: AMIRA-KEYBOAR USB KEYBOARD - phys_path: usb-0000:00:14.0-6/input0 + name: AT Translated Set 2 keyboard + phys_path: isa0060/serio0/input0 handler: event* + - group: imu + iio: + name: "{i2c-BMI0160:00,bmi260}" # Optional configuration for the composite device options: diff --git a/rootfs/usr/share/inputplumber/devices/50-onexplayer_g1_a_hx370.yaml b/rootfs/usr/share/inputplumber/devices/50-onexplayer_g1_a_hx370.yaml new file mode 100644 index 000000000..6939fdfa1 --- /dev/null +++ b/rootfs/usr/share/inputplumber/devices/50-onexplayer_g1_a_hx370.yaml @@ -0,0 +1,59 @@ +# 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 G1 + +# 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 G1 A + sys_vendor: ONE-NETBOOK + cpu_model: AMD Ryzen AI 9 HX 370 w/ Radeon 890M + +# 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:c5:00.4-1/input0 + handler: event* + - group: keyboard + evdev: + name: "{YJX-CHIP USB KEYBOARD Keyboard,AMIRA-KEYBOAR USB KEYBOARD}" + phys_path: usb-0000:c7:00.0-3.3/input0 + handler: event* + - group: keyboard + evdev: + name: AT Translated Set 2 keyboard + phys_path: isa0060/serio0/input0 + handler: event* + - group: imu + iio: + name: "{i2c-BMI0160:00,bmi260}" + +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + +# The target input device(s) to emulate by default +target_devices: + - xbox-series + - mouse + - keyboard + +# The ID of a device event mapping in the 'event_maps' folder +capability_map_id: oxp9 diff --git a/rootfs/usr/share/inputplumber/devices/50-onexplayer_g1_i.yaml b/rootfs/usr/share/inputplumber/devices/50-onexplayer_g1_i.yaml new file mode 100644 index 000000000..47a4e2fbe --- /dev/null +++ b/rootfs/usr/share/inputplumber/devices/50-onexplayer_g1_i.yaml @@ -0,0 +1,73 @@ +# 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 G1 + +# 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 G1 i + 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: + # 8840U + - group: gamepad + evdev: + name: Microsoft X-Box 360 pad + phys_path: usb-0000:00:14.0-3/input0 + handler: event* + - group: keyboard + evdev: + name: AMIRA-KEYBOAR USB KEYBOARD + phys_path: usb-0000:00:14.0-6/input0 + handler: event* + + # HX 370 + - group: gamepad + evdev: + name: Microsoft X-Box 360 pad + phys_path: usb-0000:c5:00.4-1/input0 + handler: event* + - group: keyboard + evdev: + name: "{YJX-CHIP USB KEYBOARD Keyboard,AMIRA-KEYBOAR USB KEYBOARD}" + phys_path: usb-0000:c7:00.0-3.3/input0 + handler: event* + + # All Units + - group: keyboard + evdev: + name: AT Translated Set 2 keyboard + phys_path: isa0060/serio0/input0 + handler: event* + - group: imu + iio: + name: "{i2c-BMI0160:00,bmi260}" + +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + +# The target input device(s) to emulate by default +target_devices: + - xbox-series + - mouse + - keyboard + +# The ID of a device event mapping in the 'event_maps' folder +capability_map_id: oxp6 diff --git a/rootfs/usr/share/inputplumber/schema/capability_map_v1.json b/rootfs/usr/share/inputplumber/schema/capability_map_v1.json index ee68030cc..35ca63af3 100644 --- a/rootfs/usr/share/inputplumber/schema/capability_map_v1.json +++ b/rootfs/usr/share/inputplumber/schema/capability_map_v1.json @@ -85,6 +85,8 @@ "KeyMinus", "KeyEqual", "KeyBackspace", + "KeyBrightnessDown", + "KeyBrightnessUp", "KeyTab", "KeyQ", "KeyW",