[chuck-users] odd hid issue (touchpad)
haberg at math.su.se
Fri Jul 17 13:22:16 EDT 2009
On 17 Jul 2009, at 15:58, Kassen wrote:
>> You might want to have a look at the spacenavigator thread, for
>> and what follows.
> That is a very different issue, in that case we were dealing with a
> device of a type unknown to ChucK. Here we are dealing with a laptop
> touchpad and touchpads work as mice (in addition to the other
> capabilities that you outline below which we don't yet deal with).
The general interface just provides a list of (device_type,
button_number, button_range, button_intended_use) or something (don't
remember details). Chuck implements some of those choices, hardcoded
with respect to (device_type, button_intended_use).
> Up to here ChucK agrees with me, this is what it prints when running
> [chuck](VM): sporking incoming shred: 1 (mouse.ck)...
> mouse 'SynPS/2 Synaptics TouchPad' ready
So this means that the touchpad has been registered as type mouse.
>> The HIDs work so that they have a series of button which can give
>> range of values and they are also marked for intended use. So a
>> mouse report relative position or velocities (don't remember
>> which), whereas a trackpad report absolute position - a different
> I do believe touchpads also output the change in position.
They may or may not, I think - they HIDs can pretty much choose what
varibles they want to provide. There was another thread withy this
If you have a Mac with gcc on it, you might try the program I hacked
up. It lists all the variables for all attached HIDs.
> I think it might be interesting to also read this absolute position
> for ChaosPad style modulations but that's something for the wishlist.
From what I could see, is a dynamic interface, like in that program.
Then any HID device with any of its variables can be used.
> On Mac OS X, all HISs in each category start at 0. So there is no
> need going up in numbers.
> I'm not sure what you mean by that; the first one is indeed always
> called "0" but that may not be the one we are interested in or we
> may be using several devices at the same time; I regularly perform
> with 3 joystick devices, for example.
The API provides, for each HID device type, an iterator, that
iterators through all devices. Somehow it is the standard to start at
0. So unless one attahces and removes devices, there will be no gaps
More information about the chuck-users