[PD] hid objects on linux/mac/win? hidraw on linux? hidraw parsing?

Peter P. peterparker at fastmail.com
Wed Mar 13 12:24:38 CET 2024


Dear Albert, Lucas, list,

* Albert Rafetseder <albert.rafetseder at univie.ac.at> [2024-03-13 08:21]:
> Dear Peter & all,
> 
> > On Linux I can install [hidraw] 0.1.0 via Deken. The external loads
> > without errors, but I am not getting any response clicking the
> > "listdevices" message.
> 
> As Lucas reported in the other thread, this works just fine for me. (Do you
> see any USB devices, HID or not, when you `lsusb -v` on the command line?)
Yes, I see three HIDs amongst other usb devices.

I just found the problem: /dev/hidraw* were not assigned to the 'input'
user group I am a member of. Now I just have to check if these
permissions are persistent across reboots.

I didn't recongnize this as the source of my problem since [hid] uses
/dev/input/* paths, which had the correct permissions already.

> > Colleagues have tried to find [hid] for their newer apple cpu's
> > without success unless they start Pd under the Rosetta emulation and
> > install Albert's amd64-32 package.
> 
> Good to know, and sorry for making you depend on Rosetta. I don't have much
> time to finally get the build system for [hid] updated, nor have access to
> Apple Silicon. Some kind soul on this list even offered to compile things
> for me -- I've gotten nowhere with the required thinking and coding since, I
> apologize!
No worries!

> > Interestingly there exists a hid Deken package for Darwin-arm64-32
> > http://deken.puredata.info/library/hid/0.1.0
> > but it is not displayed in Pd's built-in search engine on OS X as far as
> > I can remember (maybe someone can check this?).
> 
> Deken on pd 0.52.1 (a self-built version IIRC) on Linux, when configured to
> *not* hide packages for foreign platforms, gives me this:
> 
> hid[v0.1.0](Darwin-arm64-32).dek
> 	Uploaded by critapec @ 2022-11-09 00:32:28
Yes, that's the package I was referring to. Did anyone install and use
it on Mac M1 cpu's natively?
 
> > On Windows there is only [hidraw], correct?
> 
> At least there is no [hid]. The sources and makefile include mentions of
> "cygwin", but I don't have a Windows machine either. Even if I could build
> it with mingw, I couldn't test.

I just found out that there is also [hidio] for Windows by Martin Peach,
which should get mentioned in the wiki page kindly created by Albert at
https://puredata.info/Members/albert/USB

Excellent page Albert, thank you!

[hidio] also got compiled for Mac it seems:
https://github.com/Benitoite/hidio
forked from
https://puredata.info/downloads/hidio

I think it should include some info about setting permissions
(permanently) as well as a hint to security issues when logging
keypresses all the time.

That page could furthermore include information about the [key] objects
to only report key presses when Pd has the focus, and that automatic key
repeats from the OS might be a major hindrance for certain cases (such
as mimicing an organ keyboard).
On Linux I it can be disabled using 'xset r off'.
[hid] and/or [hidraw] might be able to circumvent this issue.

Btw, Gem offers [gemmouse], and there are certain 2D mousable canvas
abstractins flying around the Pd world.

best, Peter





More information about the Pd-list mailing list