Class hid

Hid class

Functions

hid.add (dev) static callback when any hid device is added; user scripts can redefine
hid.remove (dev) static callback when any hid device is removed; user scripts can redefine
hid.connect (n) create device, returns object with handler and send
hid.cleanup () clear handlers

Methods

hid:new (id, name, types, codes, dev) constructor


Functions

hid.add (dev)
static callback when any hid device is added; user scripts can redefine

Parameters:

  • dev : a Hid table
hid.remove (dev)
static callback when any hid device is removed; user scripts can redefine

Parameters:

  • dev : a Hid table
hid.connect (n)
create device, returns object with handler and send

Parameters:

  • n
hid.cleanup ()
clear handlers

Methods

hid:new (id, name, types, codes, dev)
constructor

Parameters:

  • id integer : arbitrary numeric identifier
  • name string : name
  • types string : array of supported event types. keys are type codes, values are strings
  • codes userdata : array of supported codes. each entry is a table of codes of a given type. subtables are indexed by supported code numbers; values are code names
  • dev userdata : opaque pointer to device
generated by LDoc 1.4.6 Last updated 2020-03-28 23:45:19