Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(OneXPlayer X1): Add OneXPlayer X1 series. #191

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
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,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
Loading