//HID holds the in-coming event channel, available button and hat indexes, and registered events for a device, and has methods to control and adjust behaviour.
// HID holds the in-coming event channel, available button and hat indexes, and registered events, for a human interface device.
// has methods to control and adjust behaviour.
typeHIDstruct{
OSEventschanosEventRecord
Buttonsmap[uint8]button
@@ -218,6 +219,28 @@ type Channel struct {
Methodfunc(HID,uint8)chanEvent
}
// Capture is highlevel automation of the setup of event channels.
// returned are matching chan's for each registree, which then receive events of the type and index the registree indicated.
// It uses the first available joystick, from a max of 4.
// Doesn't return HID object, so settings are fixed.