-
Notifications
You must be signed in to change notification settings - Fork 12
/
composite_device_v1.json
299 lines (299 loc) · 9.01 KB
/
composite_device_v1.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/CompositeDevice",
"definitions": {
"CompositeDevice": {
"description": "Describes the source devices to aggregate",
"type": "object",
"additionalProperties": false,
"properties": {
"version": {
"description": "Schema version number",
"type": "integer"
},
"kind": {
"description": "The type of configuration schema",
"type": "string"
},
"name": {
"description": "Name of the composite device mapping",
"type": "string"
},
"single_source": {
"description": "If true, this composite device should only use one source device. Defaults to false.",
"type": "boolean",
"default": false
},
"matches": {
"description": "Only use this profile if *any* of the given DMI system matches match. If this list is empty, then the source devices will *always* be checked.",
"type": "array",
"items": {
"$ref": "#/definitions/Match"
}
},
"source_devices": {
"description": "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 event map.",
"type": "array",
"items": {
"$ref": "#/definitions/SourceDevice"
}
},
"capability_map_id": {
"description": "The ID of a device event mapping in the 'capability_maps' directory",
"type": "string"
},
"options": {
"$ref": "#/definitions/Options"
},
"target_devices": {
"description": "Target input device(s) to emulate by default. Can be one of ['mouse', 'keyboard', 'gamepad', 'xb360', 'xbox-elite', 'xbox-series', 'deck', 'ds5', 'ds5-edge', 'touchscreen', 'touchpad'].",
"type": "array",
"items": {
"type": "string",
"enum": [
"mouse",
"keyboard",
"gamepad",
"xb360",
"xbox-elite",
"xbox-series",
"deck",
"ds5",
"ds5-edge",
"touchpad",
"touchscreen"
]
}
}
},
"required": [
"kind",
"matches",
"name",
"source_devices",
"version"
],
"title": "CompositeDevice"
},
"Options": {
"description": "Optional configuration for the composite device",
"type": "object",
"additionalProperties": false,
"properties": {
"auto_manage": {
"description": "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'",
"type": "boolean",
"default": false
}
},
"title": "Options"
},
"Match": {
"description": "Only use this configuration if *any* of the given items match the system. If this list is empty, then matching source devices will always create a CompositeDevice.",
"type": "object",
"additionalProperties": false,
"properties": {
"dmi_data": {
"$ref": "#/definitions/DMIMatch"
}
},
"title": "Match"
},
"DMIMatch": {
"description": "Match DMI system data",
"type": "object",
"additionalProperties": false,
"properties": {
"bios_release": {
"description": "BIOS release to match found at /sys/class/dmi/id/bios_release",
"type": "string"
},
"bios_vendor": {
"description": "BIOS vendor to match found at /sys/class/dmi/id/bios_vendor",
"type": "string"
},
"bios_version": {
"description": "BIOS version to match found at /sys/class/dmi/id/bios_version",
"type": "string"
},
"board_name": {
"description": "Board name to match found at /sys/class/dmi/id/board_name",
"type": "string"
},
"product_name": {
"description": "Product name to match found at /sys/class/dmi/id/product_name",
"type": "string"
},
"product_version": {
"description": "Product version to match found at /sys/class/dmi/id/product_version",
"type": "string"
},
"product_sku": {
"description": "Product SKU to match found at /sys/class/dmi/id/product_sku",
"type": "string"
},
"sys_vendor": {
"description": "System vendor to match found at /sys/class/dmi/id/sys_vendor",
"type": "string"
},
"cpu_vendor": {
"description": "CPU vendor to match from 'lscpu'",
"type": "string"
}
},
"required": [],
"title": "Match"
},
"SourceDevice": {
"type": "object",
"additionalProperties": false,
"properties": {
"group": {
"description": "Custom group identifier for the source device. This is used by the event mappings to determine what source inputs should be mapped.",
"type": "string",
"enum": [
"keyboard",
"mouse",
"gamepad",
"imu"
]
},
"ignore": {
"description": "If true, this source device will be ignored and not managed by InputPlumber. Defaults to false.",
"type": "boolean",
"default": false
},
"blocked": {
"description": "If true, device will be grabbed but no events from this device will reach target devices. Defaults to false.",
"type": "boolean",
"default": false
},
"evdev": {
"$ref": "#/definitions/Evdev"
},
"hidraw": {
"$ref": "#/definitions/Hidraw"
},
"iio": {
"$ref": "#/definitions/IIO"
},
"unique": {
"description": "If false, any devices matching this description will be added to the existing composite device. Defaults to true.",
"type": "boolean"
}
},
"required": [
"group"
],
"title": "SourceDevice"
},
"Evdev": {
"description": "Source device to manage. Properties support globbing patterns.",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "Name of the source device defined in /proc/bus/input/devices",
"type": "string"
},
"handler": {
"description": "Event handler for the source device in /dev/input",
"type": "string"
},
"phys_path": {
"description": "Phys path as defined in /proc/bus/input/devices",
"type": "string"
},
"vendor_id": {
"description": "ID Vendor defined in /proc/bus/input/devices",
"type": "string"
},
"product_id": {
"description": "ID Product defined in /proc/bus/input/devices",
"type": "string"
}
},
"required": [],
"title": "Evdev"
},
"Hidraw": {
"type": "object",
"additionalProperties": false,
"properties": {
"handler": {
"description": "HIDRaw handler for the source device in /dev/hidraw*",
"type": "string"
},
"vendor_id": {
"type": "integer"
},
"product_id": {
"type": "integer"
},
"interface_num": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"title": "Hidraw"
},
"IIO": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "IIO handler for the source device in /sys/bus/iio/devices/*",
"type": "string"
},
"name": {
"type": "string"
},
"mount_matrix": {
"$ref": "#/definitions/MountMatrix"
}
},
"title": "IIO"
},
"MountMatrix": {
"type": "object",
"description": "Custom mount matrix to use to define how sensors are physically mounted",
"additionalProperties": false,
"properties": {
"x": {
"description": "Matrix for x value",
"type": "array",
"minItems": 3,
"maxItems": 3,
"items": {
"type": "number"
}
},
"y": {
"description": "Matrix for y value",
"type": "array",
"minItems": 3,
"maxItems": 3,
"items": {
"type": "number"
}
},
"z": {
"description": "Matrix for z value",
"type": "array",
"minItems": 3,
"maxItems": 3,
"items": {
"type": "number"
}
}
},
"required": [
"x",
"y",
"z"
]
}
}
}