On Mar 3, 2005, at 10:48 AM, Georg Holzmann wrote:
Hallo!
Unless you want to be an alpha tester for the [hid] object (which
would be much appreciated :), I would suggest using [linuxevent] for
now.Of course I want to be an alpha-tester :) - but I tried it and it
didn't work. If I press a key, it is detected, but not which key ... (I tried it with the hid version from your hp) I also tried [linuxevent] and there is the same problem.
[linuxevent] is quite a simple object, it just dumps data from the
/dev/input/event? device to Pd land. Are you sure you are getting data
from the device? You can "cat /dev/input/event0" and then try the
different devices.
IIRC, the keyboard keys are not yet fully mapped with the [hid]
object. Its not the most exciting project, it basically involves
writing a lookup table to translate Linux input key types to [hid]
key types.If you give me a hint how I shouldcan make it I would do it ...
In the Pd CVS, you'll need to work on the file
externals/hcs/hid/hid_linux.c. The events are gotten by the while loop
in hid_get_events(); You'll need to implement a function that does a
table lookup using the event code define(i.e. KEY_A) and translates it
to a lowercase string/symbol name "key_a". This table should be
auto-generated from /usr/include/linux/input.h. I think the table
should include all KEY_? types there (KEY_ESC -> KEY_MEDIA).
I didn't create a separate build system, use the externals build system
in externals/build/linux.
It would be awesome if you got this working!
.hc
Thanks, LG Georg
"Computer science is no more related to the computer than astronomy is
related to the telescope."
-Edsger Dykstra