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
4 changes: 4 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 @@ -62,10 +62,14 @@ dmi:*svnGPD:pnG1618-03:*
dmi:*svnGPD:pnG1618-04:*
# GPD Win 5
dmi:*svnGPD:pnG1618-05:*
# GPD Win Max
dmi:*svnGPD:pnG1619-01:*
# GPD Win Max 2
dmi:*svnGPD:pnG1619-04:*
dmi:*svnGPD:pnG1619-05:*
# GPD Win Mini
dmi:*svnGPD:pnG1617-01:*
dmi:*svnGPD:pnG1617-02:*
# KONKR Fit
dmi:*svnKONKR:pnKONKRFIT:*
# Lenovo Legion Go
Expand Down
34 changes: 32 additions & 2 deletions rootfs/usr/share/inputplumber/capability_maps/gpd_type2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,46 @@ id: gpd2
mapping:
- name: Left Paddle
source_events:
- keyboard: Key0
- keyboard: KeyLeftCtrl
- keyboard: KeyLeftShift
- keyboard: KeyF14
target_event:
gamepad:
button: LeftPaddle1
- name: Right Paddle
source_events:
- keyboard: Key9
- keyboard: KeyF3
- keyboard: KeyF15
target_event:
gamepad:
button: RightPaddle1
- name: Home
source_events:
- keyboard: KeyLeftMeta
- keyboard: KeyD
target_event:
gamepad:
button: Guide
- name: Home (Long Press)
source_events:
- keyboard: KeyTab
target_event:
gamepad:
button: Guide
- name: Menu
source_events:
- keyboard: KeyLeftCtrl
- keyboard: KeyLeftMeta
- keyboard: KeyO
target_event:
gamepad:
button: QuickAccess
- name: Keyboard (Long Press)
source_events:
- keyboard: KeyDelete
target_event:
gamepad:
button: QuickAccess2

# List of events to filter from the source devices
filtered_events: []
25 changes: 0 additions & 25 deletions rootfs/usr/share/inputplumber/capability_maps/gpd_type3.yaml

This file was deleted.

63 changes: 0 additions & 63 deletions rootfs/usr/share/inputplumber/capability_maps/gpd_type4.yaml

This file was deleted.

62 changes: 62 additions & 0 deletions rootfs/usr/share/inputplumber/devices/50-gpd_win4_2022.yaml
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: GPD Win4 2022

# 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: G1618-04
sys_vendor: GPD
cpu_model: AMD Ryzen 7 6800U

# 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:
# Back paddles
- group: keyboard
hidraw:
vendor_id: 0x2f24
product_id: 0x0135
interface_num: 1
- group: gamepad
evdev:
name: "Microsoft X-Box 360 pad"
phys_path: usb-0000:73:00.3-4.1/input0
handler: event*
- group: keyboard
blocked: true
evdev:
name: " Mouse for Windows"
handler: event*
phys_path: usb-0000:73:00.3-4.2/input1
- group: imu
iio:
name: "{i2c-BMI0160:00,bmi260}"
mount_matrix:
x: [-1, 0, 0]
y: [0, 0, 1]
z: [0, -1, 0]

# 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
66 changes: 66 additions & 0 deletions rootfs/usr/share/inputplumber/devices/50-gpd_win4_2023.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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: GPD Win4 2023

# 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: G1618-04
sys_vendor: GPD
cpu_model: AMD Ryzen 7 7840U
- dmi_data:
product_name: G1618-04
sys_vendor: GPD
cpu_model: AMD Ryzen 5 7640U

# 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:
# Back paddles
- group: keyboard
hidraw:
vendor_id: 0x2f24
product_id: 0x0135
interface_num: 1
- group: gamepad
evdev:
name: "Microsoft X-Box 360 pad"
phys_path: usb-0000:63:00.3-3.1/input0
handler: event*
- group: keyboard
blocked: true
evdev:
name: " Mouse for Windows"
handler: event*
phys_path: usb-0000:63:00.3-3.2/input1
- group: imu
iio:
name: "{i2c-BMI0160:00,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) to emulate by default
target_devices:
- xbox-elite
- mouse
- keyboard
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: GPD Win4
name: GPD Win4 2025

# Only allow a single source device per composite device of this type.
single_source: false
Expand All @@ -18,42 +18,31 @@ matches:
- dmi_data:
product_name: G1618-04
sys_vendor: GPD
cpu_model: AMD Ryzen AI 9 HX 370

# 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:
# GPD Win4 2022 (6800U)
- group: gamepad
evdev:
name: "Microsoft X-Box 360 pad"
phys_path: usb-0000:73:00.3-4.1/input0
handler: event*
# Back paddles
- group: keyboard
evdev:
name: " Mouse for Windows"
handler: event*
phys_path: usb-0000:73:00.3-4.2/input1
- group: imu
iio:
name: "{i2c-BMI0160:00,bmi260}"
mount_matrix:
x: [-1, 0, 0]
y: [0, -1, 0]
z: [0, 0, 1]
# GPD Win4 2025 (HX 370)
hidraw:
vendor_id: 0x2f24
product_id: 0x0135
interface_num: 1
- group: gamepad
evdev:
name: "Microsoft X-Box 360 pad"
phys_path: usb-0000:66:00.0-2.1/input0
handler: event*
- group: keyboard
blocked: true
evdev:
name: " Mouse for Windows"
handler: event*
phys_path: usb-0000:66:00.0-2.2/input1
- group: imu
iio:
name: i2c-BMI0260:00
name: "{i2c-BMI0160:00,bmi260}"
mount_matrix:
x: [-1, 0, 0]
y: [0, -1, 0]
Expand All @@ -71,6 +60,3 @@ target_devices:
- xbox-elite
- mouse
- keyboard

# The ID of a device event mapping in the 'event_maps' folder
capability_map_id: gpd3
28 changes: 22 additions & 6 deletions rootfs/usr/share/inputplumber/devices/50-gpd_win5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,37 @@ source_devices:
phys_path: usb-0000:66:00.0-5.1/input0
handler: event*
capability_map_id: gpd_menu
- group: keyboard
evdev:
name: " Mouse for Windows"
handler: event*
phys_path: usb-0000:66:00.0-5.2/input0
- group: keyboard
evdev:
name: " Keyboard for Windows"
handler: event*
phys_path: usb-0000:66:00.0-5.3/input0
events:
exclude:
- "*"
include:
- Keyboard:KeyF14
- Keyboard:KeyF15
- Keyboard:KeyF3
- Keyboard:KeyLeftCtrl
- Keyboard:KeyLeftShift
- group: keyboard
evdev:
name: AT Translated Set 2 keyboard
phys_path: isa0060/serio0/input0
handler: event*
events:
exclude:
- "*"
include:
- Keyboard:KeyD
- Keyboard:KeyDelete
- Keyboard:KeyLeftCtrl
- Keyboard:KeyLeftMeta
- Keyboard:KeyO
- Keyboard:KeyTab
- Keyboard:KeyVolumeDown
- Keyboard:KeyVolumeUp
- group: imu
iio:
name: "{i2c-BMI0160:00,bmi260}"
Expand All @@ -65,4 +81,4 @@ target_devices:
- keyboard

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