capabilities(
name,root) ->caps
Read one event node's identity and capabilities from sysfs
name is the node's name under /dev/input, such as event4, as nodes
lists them. Reads <root>/<name>/device/uevent, root being
/sys/class/input by default, and opens nothing. Returns nil when the
file does not read or names no device.
| field | description |
|---|---|
caps.info | { name, bustype, vendor, product, version }, as in dev.info |
caps.axes | the set of EV_ABS codes the device reports |
caps.buttons | the set of EV_KEY codes the device reports |
looks_like_stick and looks_like_keyboard take caps as they take an
open device, and ignored takes caps.info. An axis carries no
calibration here: that needs the node open.