[libhid-discuss] how do I read events from a Hama MCE remote (keyboard+mouse)

Péter Szabó ptspts+libhid at gmail.com
Tue Oct 6 20:06:41 UTC 2009


Hi,

> Look for the Linux input layer developers. Ask them how you can make
> a device accessible via the event interface but just not pool into
> the "console" keyboard and mouse inputs. I'd be happy to learn what
> they reply too.

I've got a quick answer from the Linux HID developers:

  ioctl(open("/dev/input/event7"), EVIOCGRAB, 1);

as long as this filehandle is open, the events generated would go only
to this filehandle (not to other open()s of the same device or to the
system keyboard or mouse event pool). At most one process can hold a
successful EVIOCGRAB at a HID device at a time. Lirc can be configured
to do an EVIOCGRAB.

Best regards,

Péter



More information about the libhid-discuss mailing list