Skip to content

Commit 3300b3d

Browse files
committed
[feat] Add base support for Zotac Zone driver
Full support for the driver to enable the majority of use-cases. Does not include proper support of dial/wheels or touchpads. Signed-off-by: Luke Jones <[email protected]>
1 parent 6df0b67 commit 3300b3d

File tree

23 files changed

+1839
-1354
lines changed

23 files changed

+1839
-1354
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v2.json
2+
# Schema version number
3+
version: 2
4+
5+
# The type of configuration schema
6+
kind: CapabilityMap
7+
8+
# Name for the device event map
9+
name: Zotac Zone Type 1
10+
11+
# Unique identifier of the capability mapping
12+
id: zone1
13+
14+
# List of mapped events that are activated by a specific set of activation keys.
15+
mapping:
16+
- name: ZOTAC (shortpress)
17+
source_events:
18+
- evdev:
19+
event_type: KEY
20+
event_code: KEY_F16
21+
value_type: button
22+
target_event:
23+
gamepad:
24+
button: Guide
25+
- name: MORE
26+
source_events:
27+
- evdev:
28+
event_type: KEY
29+
event_code: KEY_F17
30+
value_type: button
31+
target_event:
32+
gamepad:
33+
button: QuickAccess
34+
- name: HOME (shortpress)
35+
source_events:
36+
- evdev:
37+
event_type: KEY
38+
event_code: KEY_F18
39+
value_type: button
40+
target_event:
41+
gamepad:
42+
button: QuickAccess2
43+
- name: HOME (longpress)
44+
source_events:
45+
- evdev:
46+
event_type: KEY
47+
event_code: KEY_F19
48+
value_type: button
49+
target_event:
50+
gamepad:
51+
button: Keyboard
52+
- name: Left Paddle
53+
source_events:
54+
- evdev:
55+
event_type: KEY
56+
event_code: KEY_HOME
57+
value_type: button
58+
target_event:
59+
gamepad:
60+
button: LeftPaddle1
61+
- name: Right Paddle
62+
source_events:
63+
- evdev:
64+
event_type: KEY
65+
event_code: KEY_END
66+
value_type: button
67+
target_event:
68+
gamepad:
69+
button: RightPaddle1
70+
- name: Left Dial
71+
source_events:
72+
- evdev:
73+
event_type: REL
74+
event_code: REL_HWHEEL
75+
value_type: joystick_x
76+
target_event:
77+
gamepad:
78+
dial:
79+
name: LeftStickDial
80+
- name: Right Dial
81+
source_events:
82+
- evdev:
83+
event_code: REL_WHEEL
84+
event_type: REL
85+
value_type: joystick_x
86+
target_event:
87+
gamepad:
88+
dial:
89+
name: RightStickDial
90+
91+
# List of events to filter from the source devices
92+
filtered_events: []
+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/composite_device_v1.json
2+
# Schema version number
3+
version: 1
4+
5+
# The type of configuration schema
6+
kind: CompositeDevice
7+
8+
# Name of the composite device mapping
9+
name: Zotac Zone
10+
11+
# Only allow a single source device per composite device of this type.
12+
single_source: false
13+
14+
# Only use this profile if *any* of the given matches matches. If this list is
15+
# empty, then the source devices will *always* be checked.
16+
# /sys/class/dmi/id/product_name
17+
matches:
18+
- dmi_data:
19+
board_name: G0A1W
20+
sys_vendor: ZOTAC
21+
22+
# One or more source devices to combine into a single virtual device. The events
23+
# from these devices will be watched and translated according to the key map.
24+
source_devices:
25+
- group: gamepad # Used for setting attributes on load
26+
hidraw:
27+
vendor_id: 0x1ee9
28+
product_id: 0x1590
29+
interface_num: 3
30+
- group: gamepad
31+
evdev:
32+
name: ZOTAC Gaming Zone Gamepad
33+
vendor_id: "1ee9"
34+
product_id: "1590"
35+
handler: event*
36+
capability_map_id: zone1
37+
- group: keyboard
38+
evdev:
39+
name: ZOTAC Gaming Zone Keyboard
40+
vendor_id: "1ee9"
41+
product_id: "1590"
42+
handler: event*
43+
capability_map_id: zone1
44+
- group: mouse
45+
evdev:
46+
name: ZOTAC Gaming Zone Mouse
47+
vendor_id: "1ee9"
48+
product_id: "1590"
49+
handler: event*
50+
- group: mouse
51+
evdev:
52+
name: ZOTAC Gaming Zone Dials
53+
vendor_id: "1ee9"
54+
product_id: "1590"
55+
handler: event*
56+
capability_map_id: zone1
57+
- group: imu
58+
iio:
59+
name: i2c-BMI0160:00
60+
61+
# Optional configuration for the composite device
62+
options:
63+
# If true, InputPlumber will automatically try to manage the input device. If
64+
# this is false, InputPlumber will not try to manage the device unless an
65+
# external service enables management of the device. Defaults to 'false'
66+
auto_manage: true
67+
68+
# The target input device(s) to emulate by default
69+
target_devices:
70+
- xbox-elite
71+
- mouse
72+
- keyboard

Diff for: rootfs/usr/share/inputplumber/profiles/default.yaml

+66-30
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,69 @@ name: Default
1616

1717
# Profile mappings
1818
mapping:
19-
- name: LeftTop
20-
source_event:
21-
gamepad:
22-
button: LeftTop
23-
target_events:
24-
- gamepad:
25-
button: LeftPaddle1
26-
- name: RightTop
27-
source_event:
28-
gamepad:
29-
button: RightTop
30-
target_events:
31-
- gamepad:
32-
button: RightPaddle1
33-
- name: Keyboard
34-
source_event:
35-
gamepad:
36-
button: Keyboard
37-
target_events:
38-
- gamepad:
39-
button: Guide
40-
- gamepad:
41-
button: North
42-
- name: QuickAccess2
43-
source_event:
44-
gamepad:
45-
button: QuickAccess2
46-
target_events:
47-
- gamepad:
48-
button: Screenshot
19+
- name: LeftTop
20+
source_event:
21+
gamepad:
22+
button: LeftTop
23+
target_events:
24+
- gamepad:
25+
button: LeftPaddle1
26+
- name: RightTop
27+
source_event:
28+
gamepad:
29+
button: RightTop
30+
target_events:
31+
- gamepad:
32+
button: RightPaddle1
33+
- name: Keyboard
34+
source_event:
35+
gamepad:
36+
button: Keyboard
37+
target_events:
38+
- gamepad:
39+
button: Guide
40+
- gamepad:
41+
button: North
42+
- name: QuickAccess2
43+
source_event:
44+
gamepad:
45+
button: QuickAccess2
46+
target_events:
47+
- gamepad:
48+
button: Screenshot
49+
- name: Left Dial Counter-clockwise
50+
source_event:
51+
gamepad:
52+
dial:
53+
name: LeftStickDial
54+
direction: counter-clockwise
55+
target_events:
56+
- mouse:
57+
button: "WheelLeft"
58+
- name: Left Dial Clockwise
59+
source_event:
60+
gamepad:
61+
dial:
62+
name: LeftStickDial
63+
direction: clockwise
64+
target_events:
65+
- mouse:
66+
button: "WheelRight"
67+
- name: Right Dial Counter-clockwise
68+
source_event:
69+
gamepad:
70+
dial:
71+
name: RightStickDial
72+
direction: counter-clockwise
73+
target_events:
74+
- mouse:
75+
button: "WheelUp"
76+
- name: Right Dial Clockwise
77+
source_event:
78+
gamepad:
79+
dial:
80+
name: RightStickDial
81+
direction: clockwise
82+
target_events:
83+
- mouse:
84+
button: "WheelDown"

0 commit comments

Comments
 (0)