diff --git a/rootfs/usr/lib/udev/hwdb.d/60-inputplumber-autostart.hwdb b/rootfs/usr/lib/udev/hwdb.d/60-inputplumber-autostart.hwdb index 80a34947..b48736ac 100644 --- a/rootfs/usr/lib/udev/hwdb.d/60-inputplumber-autostart.hwdb +++ b/rootfs/usr/lib/udev/hwdb.d/60-inputplumber-autostart.hwdb @@ -1,3 +1,5 @@ +# ADVAN X-PLAY +dmi:*svnADVAN:pn1301:* # Anbernic dmi:*svnAnbernic:pnWin600:* # AOKZOE A1 diff --git a/rootfs/usr/share/inputplumber/capability_maps/advan_type1.yaml b/rootfs/usr/share/inputplumber/capability_maps/advan_type1.yaml new file mode 100644 index 00000000..87c6fdcc --- /dev/null +++ b/rootfs/usr/share/inputplumber/capability_maps/advan_type1.yaml @@ -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 diff --git a/rootfs/usr/share/inputplumber/devices/50-advan_xplay.yaml b/rootfs/usr/share/inputplumber/devices/50-advan_xplay.yaml new file mode 100644 index 00000000..e389acbc --- /dev/null +++ b/rootfs/usr/share/inputplumber/devices/50-advan_xplay.yaml @@ -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 + # 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