Subject: Re: howto capture events generated by uhid(4) devices
To: Quentin Garnier <cube@cubidou.net>
From: Berndt Josef Wulf <wulf@ping.net.au>
List: port-i386
Date: 12/18/2006 13:09:20
On Monday 18 December 2006 10:34, Quentin Garnier wrote:
> On Mon, Dec 18, 2006 at 11:29:59AM +1030, Berndt Josef Wulf wrote:
> > G'day,
> >
> > what is the best strategy to capture uhid generated events?
> >
> > I've a powermate device and would like to receive notification whenever
> > the knob was turned or a button pushed.
> >
> > I wrote some test code investigating the use of kqueue's EVFILT_READ and
> > EVFILT_WRITE filter. Both return kevent =3D 0 whenever the device was
> > activated. I guess this is fine and should work, but wonder if this is
> > the right thing to do?
>
> Aren't usbhidaction(8) and associates (such as usbhid(3)) what you're
> looking for?

=46rom my understanding, usbhidaction(8) is used to associate an usbhid eve=
nt=20
with the execution of a command. I can't see how this will work from within=
=20
an application.

usbhid(3) provides routines that simplify access to usbhid devices. AFAICT =
it=20
doesn't provide event notification.

Am I missing something?

Thanks,

cheerio Berndt