Repository navigation
feat(HardwareSupport): Add guide button mapping for advan xplay handheld pc #805
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| # ADVAN X-PLAY | ||
| dmi:*svnADVAN:pn1301:* | ||
| # Anbernic | ||
| dmi:*svnAnbernic:pnWin600:* | ||
| # AOKZOE A1 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v2.json | ||
| # Schema version number | ||
| version: 2 | ||
|
|
||
| # The type of configuration schema | ||
| kind: CapabilityMap | ||
|
|
||
| # Name for the device event map | ||
| name: ADVAN X-PLAY | ||
|
|
||
| # Unique identifier of the capability mapping | ||
| id: advan1 | ||
|
|
||
| # List of mapped events | ||
| mapping: | ||
| - name: Home | ||
| mapping_type: | ||
| evdev: chord | ||
| source_events: | ||
| - evdev: | ||
| event_type: KEY | ||
| event_code: KEY_LEFTMETA | ||
| value_type: button | ||
| - evdev: | ||
| event_type: KEY | ||
| event_code: KEY_D | ||
| value_type: button | ||
| target_event: | ||
| gamepad: | ||
| button: Guide | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # 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: ADVAN X-PLAY | ||
|
|
||
| # 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: "1301" | ||
| sys_vendor: ADVAN | ||
|
|
||
| # 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: Generic X-Box pad | ||
| vendor_id: "2f24" | ||
| product_id: "0135" | ||
| handler: event* | ||
| events: | ||
| exclude: | ||
| # The pad has no dedicated Guide button. Holding the Home button makes | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the win+d release when this fires, or do both release at the same time?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It released almost at the same time, this is the home button reading, when tapping it Event: time 1794560278.272687, type 4 (EV_MSC), code 4 (MSC_SCAN), value db
Event: time 1794560278.272687, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 1
Event: time 1794560278.272687, -------------- SYN_REPORT ------------
Event: time 1794560278.274710, type 4 (EV_MSC), code 4 (MSC_SCAN), value 20
Event: time 1794560278.274710, type 1 (EV_KEY), code 32 (KEY_D), value 1
Event: time 1794560278.274710, -------------- SYN_REPORT ------------
Event: time 1794560278.279796, type 4 (EV_MSC), code 4 (MSC_SCAN), value 20
Event: time 1794560278.279796, type 1 (EV_KEY), code 32 (KEY_D), value 0
Event: time 1794560278.279796, -------------- SYN_REPORT ------------
Event: time 1794560278.287845, type 4 (EV_MSC), code 4 (MSC_SCAN), value db
Event: time 1794560278.287845, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 0
Event: time 1794560278.287845, -------------- SYN_REPORT ------------when holding the home button, after about a second it'll trigger the guide button on internal generic controller, but it immediately released. Event: time 1794560421.164268, type 1 (EV_KEY), code 316 (BTN_MODE), value 1
Event: time 1794560421.164268, -------------- SYN_REPORT ------------
Event: time 1794560421.284113, type 1 (EV_KEY), code 316 (BTN_MODE), value 0
Event: time 1794560421.284113, -------------- SYN_REPORT ------------ |
||
| # the embedded controller report one, which would trigger the Guide | ||
| # action a second time. Guide is provided by the keyboard source below. | ||
| - Gamepad:Button:Guide | ||
| - group: keyboard | ||
| evdev: | ||
| name: AT Translated Set 2 keyboard | ||
| phys_path: isa0060/serio0/input0 | ||
| handler: event* | ||
| capability_map_id: advan1 | ||
|
|
||
| # 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-elite | ||
| - mouse | ||
| - keyboard | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you can just have two source event entries, one for win and one for D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! much simpler this way