Skip to content

Commit ee69238

Browse files
pastaqShadowApex
authored andcommitted
fix(Hardware Support): Improve Win600 Support
- fixes #172
1 parent d04cfc9 commit ee69238

File tree

2 files changed

+90
-29
lines changed

2 files changed

+90
-29
lines changed
Lines changed: 89 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,118 @@
1-
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v1.json
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v2.json
22
# Schema version number
3-
version: 1
3+
version: 2
44

55
# The type of configuration schema
66
kind: CapabilityMap
77

88
# Name for the device event map
9-
name: Anbernic Type 1
9+
name: Anbernic Win600
1010

1111
# Unique identifier of the capability mapping
1212
id: anb1
1313

14-
# List of mapped events that are activated by a specific set of activation keys.
14+
# List of mapped events
1515
mapping:
16-
- name: Home (Short Press)
16+
- name: Home (Short)
17+
mapping_type:
18+
evdev: chord
1719
source_events:
18-
- keyboard: KeyG
19-
- keyboard: KeyLeftMeta
20+
- evdev:
21+
event_type: KEY
22+
event_code: KEY_ESC
23+
value_type: button
2024
target_event:
2125
gamepad:
2226
button: Guide
23-
# Workaround to enable Guide chording.
24-
- name: Home (Long Press)
27+
28+
- name: Home (Long)
29+
mapping_type:
30+
evdev: chord
2531
source_events:
26-
- keyboard: KeyEsc
32+
- evdev:
33+
event_type: KEY
34+
event_code: KEY_LEFTMETA
35+
value_type: button
36+
- evdev:
37+
event_type: KEY
38+
event_code: KEY_G
39+
value_type: button
2740
target_event:
2841
gamepad:
2942
button: Guide
43+
3044
- name: Keyboard
45+
mapping_type:
46+
evdev: chord
3147
source_events:
32-
- keyboard: KeyO
33-
- keyboard: KeyLeftCtrl
34-
- keyboard: KeyLeftMeta
48+
- evdev:
49+
event_type: KEY
50+
event_code: KEY_LEFTCTRL
51+
value_type: button
52+
- evdev:
53+
event_type: KEY
54+
event_code: KEY_LEFTMETA
55+
value_type: button
56+
- evdev:
57+
event_type: KEY
58+
event_code: KEY_O
59+
value_type: button
3560
target_event:
3661
gamepad:
3762
button: Keyboard
38-
# Windows short press seems to break things currently, so disabled for now.
39-
# - name: Windows (Short Press)
40-
# source_events:
41-
# - keyboard: KeyLeftMeta
42-
# target_event:
43-
# gamepad:
44-
# button: QuickAccess
45-
- name: Windows (Long Press)
63+
64+
- name: Windows (short)
65+
mapping_type:
66+
evdev: chord
4667
source_events:
47-
- keyboard: KeyEsc
48-
- keyboard: KeyLeftShift
49-
- keyboard: KeyLeftCtrl
68+
- evdev:
69+
event_type: KEY
70+
event_code: KEY_LEFTCTRL
71+
value_type: button
5072
target_event:
5173
gamepad:
5274
button: QuickAccess
5375

54-
# List of events to filter from the source devices
55-
filtered_events: []
76+
- name: Windows (long)
77+
mapping_type:
78+
evdev: chord
79+
source_events:
80+
- evdev:
81+
event_type: KEY
82+
event_code: KEY_LEFTCTRL
83+
value_type: button
84+
- evdev:
85+
event_type: KEY
86+
event_code: KEY_LEFTSHIFT
87+
value_type: button
88+
- evdev:
89+
event_type: KEY
90+
event_code: KEY_ESC
91+
value_type: button
92+
target_event:
93+
gamepad:
94+
button: QuickAccess2
95+
96+
- name: Home + Keyboard
97+
mapping_type:
98+
evdev: chord
99+
source_events:
100+
- evdev:
101+
event_type: KEY
102+
event_code: KEY_LEFTCTRL
103+
value_type: button
104+
- evdev:
105+
event_type: KEY
106+
event_code: KEY_LEFTMETA
107+
value_type: button
108+
- evdev:
109+
event_type: KEY
110+
event_code: KEY_O
111+
value_type: button
112+
- evdev:
113+
event_type: KEY
114+
event_code: KEY_G
115+
value_type: button
116+
target_event:
117+
gamepad:
118+
button: RightPaddle1 # Placeholder, no matching function exists

rootfs/usr/share/inputplumber/devices/50-anbernic_win600.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ source_devices:
3232
name: AT Translated Set 2 keyboard
3333
phys_path: isa0060/serio0/input0
3434
handler: event*
35+
capability_map_id: anb1
3536

3637
# Optional configuration for the composite device
3738
options:
@@ -45,6 +46,3 @@ target_devices:
4546
- xbox-series
4647
- mouse
4748
- keyboard
48-
49-
# The ID of a device event mapping in the 'event_maps' folder
50-
capability_map_id: anb1

0 commit comments

Comments
 (0)