The attached source injects events into the input core from userland.
I'm using it for simulating input events while testing embedded
systems. It Works For Me. It will probably Work For You, but no
promises there. Significant parts of it were written while I was still
figuring out what the hell is/was going on. Hence, there may be a few
obtuse bits (there certainly is at least one major inefficiency).
Pointing them out to me (or cleaning them up) would be appreciated.
Incidentally, I wrote this before noticing the write call inside the
cvs version of evdev.c; however, I still use it for two reasons:
(1) evdev.c's write call is broken.
(2) this registers its own input device, rather than piggybacking on
something else. For my uses, this is a requirement.
The primary manner in which it differs is that it accepts not a full
struct input_event, but rather a similar structure but without the
timeval at the front. I'm still not quite sure whether this was a
correct decision or not, and if someone wants to include this in the
main distribution after (and only after) the change is made, I'll
consider it.
|