aboutsummaryrefslogtreecommitdiffhomepage
path: root/evdev.lua
AgeCommit message (Collapse)AuthorFilesLines
2023-09-26Stream:evrel(): scale output values only once per eventRobin Haberkorn1-7/+8
* The old implementation would require scaling operations at sample rate, even though the value changes only very seldom. * We are working with fractions, so we don't actually need to store the unscaled value in the closure.
2023-09-22EvdevStream:new() fixed opening device by nameRobin Haberkorn1-11/+43
* Iterating by /dev/input/eventX ids was too simplistic as there can easily be gaps. * Instead, we now iterate the directory using opendir(), readdir() etc. * Unfortunately, struct dirent might not be easily definable portably. (FIXME?) * Also added EvdevStream.list(), so you now longer have to invoke evtest for finding out ids and names of HID devices for EvdevStream:new().
2023-09-22Stream:evkey(): result stream will now contain the key id if the key is ↵Robin Haberkorn1-1/+1
pressed, as it was previously documented
2023-09-16evdev.lua: support more ABS_X constantsRobin Haberkorn1-1/+24
2023-09-15documentation updateRobin Haberkorn1-1/+4
2023-09-13added LDoc documentationRobin Haberkorn1-7/+75
* gives a useful overview of everything supported right now * especially the type documentation is useful, as these things are not self-evident in Lua (because of dynamic typing). * The LDoc page can later be published as the Github pages of the project. This can even be done automatically by a Github action. However, we should first make sure that it's okay to publish the project before defending the thesis since Github pages will always be public even for private repositories. * Documentation of command-line parameters is lacking (TODO). * It may be possible to use types like "Stream(number)" to describe streams of numbers. The LDoc documentation mentions boxed types. Perhaps there can even be Streamable(number)? * We are also lacking good example programs and/or introductory material.
2023-09-05Added HID support via EvdevRobin Haberkorn1-0/+121
* This works for relative, absolute and keyboard devices * devices can be grabbed, so they do not interfere with the rest of the system