Skip to content
Open
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
89 changes: 84 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ schemars = "0.8.22"
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.140"
serde_yaml = "0.9.34"
serialport = "4.8.1"
tabled = { version = "0.18.0", features = ["ansi"] }
thiserror = "1.0.69"
tokio = { version = "1.43.0", features = ["full"] }
Expand Down
2 changes: 2 additions & 0 deletions rootfs/usr/lib/udev/hwdb.d/60-inputplumber-autostart.hwdb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ dmi:*svnONE-NETBOOK:pnONEXPLAYERminiA07:*
dmi:*svnONE-NETBOOK:pnONEXPLAYERMiniPro:*
# OneXPlayer OneXFly
dmi:*svnONE-NETBOOK:pnONEXPLAYERF1:*
dmi:*svnONE-NETBOOK:pnONEXPLAYERF1EVA-01:*
dmi:*svnONE-NETBOOK:pnONEXPLAYERF1OLED:*
dmi:*svnONE-NETBOOK:pnONEXPLAYERF1Pro:*
# OneXPlayer X1
dmi:*svnONE-NETBOOK:pnONEXPLAYERX1A:*
Expand Down
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: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 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 7

# Unique identifier of the capability mapping
id: oxp7

# 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: QuickAccess
- name: KB (Short Press)
source_events:
- keyboard: KeyRightCtrl
- keyboard: KeyLeftMeta
- keyboard: KeyO
target_event:
gamepad:
button: Keyboard
- name: Orange Button (Short Press)
source_events:
- keyboard: KeyLeftMeta
- keyboard: KeyD
target_event:
gamepad:
button: Guide
- name: Orange Button (Long Press)
source_events:
- keyboard: KeyLeftMeta
- keyboard: KeyG
target_event:
gamepad:
button: QuickAccess2
- name: Turbo + Orange Button
source_events:
- keyboard: KeyLeftMeta
- keyboard: KeySysrq
target_event:
gamepad:
button: Screenshot
- name: KB + Orange Button
source_events:
- keyboard: KeyRightCtrl
- keyboard: KeyRightAlt
- keyboard: KeyDelete
target_event:
keyboard: KeyF13
- name: M2
source_events:
- gamepad:
button: Guide
target_event:
gamepad:
button: RightPaddle1

# List of events to filter from the source devices
filtered_events: []
24 changes: 23 additions & 1 deletion rootfs/usr/share/inputplumber/devices/50-onexplayer_onexfly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ matches:
- dmi_data:
product_name: ONEXPLAYER F1
sys_vendor: ONE-NETBOOK
- dmi_data:
product_name: ONEXPLAYER F1 EVA-01
sys_vendor: ONE-NETBOOK
- dmi_data:
product_name: ONEXPLAYER F1 OLED
sys_vendor: ONE-NETBOOK
- dmi_data:
product_name: ONEXPLAYER F1Pro
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.
Expand All @@ -27,11 +36,24 @@ source_devices:
name: Microsoft X-Box 360 pad
phys_path: usb-0000:c4:00.3-4/input0
handler: event*
- group: gamepad
evdev:
name: Microsoft X-Box 360 pad
phys_path: usb-0000:c7:00.0-4/input0
handler: event*
- group: keyboard
evdev:
name: AT Translated Set 2 keyboard
phys_path: isa0060/serio0/input0
handler: event*
- group: gamepad
udev:
attributes:
- name: port
value: "0x3E8"
sys_name: "ttyS*"
subsystem: tty

- group: imu
iio:
name: i2c-BMI0160:00
Expand All @@ -50,4 +72,4 @@ target_devices:
- keyboard

# The ID of a device event mapping in the 'event_maps' folder
capability_map_id: oxp3
capability_map_id: oxp7
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: 1
kind: CompositeDevice

# Name of the composite device mapping
name: ONEXPLAYER ONEXFLY Pro
name: ONEXPLAYER X1

# Only allow a single source device per composite device of this type.
single_source: false
Expand All @@ -16,7 +16,13 @@ single_source: false
# /sys/class/dmi/id/product_name
matches:
- dmi_data:
product_name: ONEXPLAYER F1Pro
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
Expand All @@ -25,29 +31,38 @@ source_devices:
- group: gamepad
evdev:
name: Microsoft X-Box 360 pad
phys_path: usb-0000:c7:00.0-4/input0
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: gamepad
udev:
attributes:
- name: idVendor
value: "1a86"
- name: idProduct
value: "7523"
- name: bInterfaceNumber
value: "00"
sys_name: "ttyUSB*"
subsystem: tty
- group: imu
iio:
name: i2c-BMI0160:00

# 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
name: i2c-BMI0260:00

# The target input device(s) to emulate by default
# The target input device(s) that the virtual device profile can use
target_devices:
- xbox-series
- xb360
- mouse
- keyboard

# The ID of a device event mapping in the 'event_maps' folder
capability_map_id: oxp3
capability_map_id: oxp5
Loading