Package joysticks, provides simplified event routing, through channels, from the Linux joystick driver File-like interface.
events can be listened for from any thread, re-routed and simulated.
events can be listened for from any thread, dynamically re-mapped and simulated.
usage:
'Capture', a single call to setup and start basic event routing.
'Capture', a single call to setup and start basic 'Event' channeling on the first available device.
'Event', an interface, provides a time.Duration through the Moment() method, returning whatever the underlying Linux driver provides as the events timestamp, as a time.Duration.
Events, will need casting to the actual type to access data other than moment.
or (more flexible)
'Connect' to a HID by index number, then use methods to add event channels, one for each button or hat, and start running by calling 'ParcelOutEvents'.
'Connect(index)' to a HID.
Use methods to add (or alter) 'Event' channels,
event, an interface with a 'Moment' method, provides a time.Duration. Moment() returns whatever the underlying Linux driver provides as the events timestamp, in time.Duration.
Start running by calling 'ParcelOutEvents()'.
hat channel event provides current position, (x,y) the event will need casting to the hat event to access these. (and only one axis actually changes per event.)
event index to channel mappings can be changed dynamically.