USB HID Device¶
Description¶
Interface to a USB human interface device (HID) class device.
Appropriate values for the usage_page and usage parameters can be found in the HID Usage Tables. Here are the values for a few common device types:
Device type | Usage page | Usage |
---|---|---|
Keyboard | 1 | 6 |
Joystick | 1 | 4 |
Gamepad | 1 | 5 |
Signature¶
iodevice/usbhid_generic
Required Parameters¶
Optional Parameters¶
preferred_location_id¶
Default: | 0 |
---|
If MWorks finds multiple candidate devices for the given usage_page and usage, it will issue an error message that lists the product name, manufacturer name, and “location ID” for each matching device. To select the desired device, set this parameter to the reported location ID of that device.
log_all_input_values¶
Default: | NO |
---|
If YES
, MWorks will log (to the event stream and server console) all input values received from the device. Each log message will include an associated element usage page and usage. These usage page and usage values can be used to define a USB HID Input Channel for the input.
alt¶
Alternative device to use if this one fails to initialize (e.g. because the required hardware is not available). If #allowAltFailover
is set to 0 or false, this parameter is ignored.