Skip to content

Commit

Permalink
fix(OneXPlayer X1): Add OneXPlayer X1 series.
Browse files Browse the repository at this point in the history
  • Loading branch information
pastaq committed Aug 18, 2024
1 parent 4ac1ad6 commit 2f9e863
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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: []
57 changes: 57 additions & 0 deletions rootfs/usr/share/inputplumber/devices/50-onexplayer_x1.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2f9e863

Please sign in to comment.