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
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
@@ -1,3 +1,5 @@
# ADVAN X-PLAY
dmi:*svnADVAN:pn1301:*
# Anbernic
dmi:*svnAnbernic:pnWin600:*
# AOKZOE A1
Expand Down
30 changes: 30 additions & 0 deletions rootfs/usr/share/inputplumber/capability_maps/advan_type1.yaml
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:

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Author

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

- 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
55 changes: 55 additions & 0 deletions rootfs/usr/share/inputplumber/devices/50-advan_xplay.yaml
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?

@khasburrahman khasburrahman Nov 13, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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.
it doesn't register hold (2) with prolonged hold.

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