[libhid-discuss] Correct Library?

Adrian Parker adrian.l.parker at gmail.com
Fri May 23 15:36:48 UTC 2008


On Fri, May 23, 2008 at 10:52 AM, Charles Lepple <clepple at ghz.cc> wrote:

> On May 23, 2008, at 9:34 AM, 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.
>>
>
> Correct.
>
> I don't believe this is an issue on Windows, but on Linux, you will most
> likely have to adjust permissions on every USB device that you want to open


In this case I can run the program setuid root.  Perhaps not the best fix,
but I have that freedom.


> Also, there was some discussion on the libusb-win32 list about making
> libhid compile under Windows. I don't have a working Windows development
> environment where I can test this, but I understand that there was a bit of
> global search-and-replace in libhid to get things to compile. I haven't had
> the time to find the minimal set of changes necessary, though.
>

Robert V Krakora has sent me libhid code that works under Windows.


Adrian


More information about the libhid-discuss mailing list