Skip to content
Draft
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,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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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
73 changes: 73 additions & 0 deletions rootfs/usr/share/inputplumber/devices/50-onexplayer_g1_i.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions rootfs/usr/share/inputplumber/schema/capability_map_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
"KeyMinus",
"KeyEqual",
"KeyBackspace",
"KeyBrightnessDown",
"KeyBrightnessUp",
"KeyTab",
"KeyQ",
"KeyW",
Expand Down
Loading