[libhid-discuss] libhid-discuss Digest, Vol 21, Issue 6
Adrian Parker
adrian.l.parker at gmail.com
Fri May 23 13:34:19 UTC 2008
On Fri, May 23, 2008 at 8:03 AM, <
libhid-discuss-request at lists.alioth.debian.org> wrote:
> Message: 1
> Date: Thu, 22 May 2008 14:39:47 -0400
> From: "Adrian Parker" <adrian.l.parker at gmail.com>
> Subject: [libhid-discuss] Correct Library?
> To: libhid-discuss at lists.alioth.debian.org
> Message-ID:
> <7da71e910805221139r4d09a114yb601784a36a704e at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I'm wondering if libhid is the library for me. I need to allow the user to
> press a button which will be used as a Press to Talk button in a project
> I'm
> working on. The catch of course is that I don't know which USB device the
> user will press the button on (although I'll most likely limit users to
> joypads and headsets with buttons).
>
> libhid seems designed around knowing in advance which particular device you
> want to access. I don't see any functions that allow me to iterate through
> the list of enumerated HID devices (have I overlooked something?).
>
> I expected to find structures that represent various Report tpes, but I
> don't see those either.
>
> Does anyone happen to have example code of monitoring a device category
> (say
> Joystick), where the exact make/model is not known previous to run time?
>
> I see hid_dump_tree mentioned, but that might write to a file by the looks
> of the header?
>
>
> --
> Adrian Parker
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 22 May 2008 22:35:45 +0200
> From: Peter Stuge <stuge-libhid at cdy.org>
> Subject: Re: [libhid-discuss] Correct Library?
> To: libhid-discuss at lists.alioth.debian.org
> Message-ID: <20080522203545.25077.qmail at cdy.org>
> Content-Type: text/plain; charset=us-ascii
>
> On Thu, May 22, 2008 at 02:39:47PM -0400, Adrian Parker wrote:
> > I'm wondering if libhid is the library for me. I need to allow the
> > user to press a button which will be used as a Press to Talk button
> > in a project I'm working on. The catch of course is that I don't
> > know which USB device the user will press the button on (although
> > I'll most likely limit users to joypads and headsets with buttons).
>
> >From this description I would suggest that you simply use the kernel
> input event layer.
>
That would not be portable though right? I'm developing this for Windows
and Linux.
Adrian
More information about the libhid-discuss
mailing list