-
Notifications
You must be signed in to change notification settings - Fork 72
feat(onexplayer): add ONEXPLAYER 3 support #660
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
Open
Grippy98
wants to merge
1
commit into
ShadowBlip:main
Choose a base branch
from
Grippy98:codex/onexplayer-3-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+104
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
rootfs/usr/share/inputplumber/capability_maps/onexplayer_type9.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # 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 | ||
|
|
||
| # Verification (ONEXPLAYER 3): | ||
| # ONEX: evtest reports LeftCtrl+LeftAlt+LeftMeta on HID 1a86:fe00. | ||
| # Options: evtest reports LeftCtrl+LeftMeta+O on HID 1a86:fe00. | ||
| # Home: no evdev event; OXP HID interface 2 reports vendor button ID 0x24, | ||
| # which the OXP HID driver translates to gamepad Keyboard. | ||
|
|
||
| # List of mapped events that are activated by a specific set of activation keys. | ||
| mapping: | ||
| - name: ONEX | ||
| source_events: | ||
| - keyboard: KeyLeftCtrl | ||
| - keyboard: KeyLeftAlt | ||
| - keyboard: KeyLeftMeta | ||
| target_event: | ||
| gamepad: | ||
| button: QuickAccess2 | ||
| - name: Options | ||
| source_events: | ||
| - keyboard: KeyLeftCtrl | ||
| - keyboard: KeyLeftMeta | ||
| - keyboard: KeyO | ||
| target_event: | ||
| gamepad: | ||
| button: QuickAccess | ||
|
|
||
| # List of events to filter from the source devices | ||
| filtered_events: [] |
62 changes: 62 additions & 0 deletions
62
rootfs/usr/share/inputplumber/devices/50-onexplayer_3.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # 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 3 | ||
|
|
||
| # 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 3 | ||
| 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:00:14.0-7/input0 | ||
| handler: event* | ||
| - group: keyboard | ||
| evdev: | ||
| name: HID 1a86:fe00 | ||
| phys_path: usb-0000:00:14.0-5/input0 | ||
| handler: event* | ||
| - group: gamepad | ||
| hidraw: | ||
| vendor_id: 0x1a86 | ||
| product_id: 0xfe00 | ||
| interface_num: 2 | ||
| - group: imu | ||
| iio: | ||
| name: bmi260 | ||
| mount_matrix: | ||
| x: [0, 1, 0] | ||
| y: [1, 0, 0] | ||
| z: [0, 0, 1] | ||
|
|
||
| # 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) that the virtual device profile can use | ||
| target_devices: | ||
| - xbox-elite | ||
| - mouse | ||
| - keyboard | ||
|
|
||
| # The ID of a device event mapping in the 'capability_maps' folder | ||
| capability_map_id: oxp9 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.