[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] wacom and hid



First, my code:
HIDDeviceService.buildDeviceList(nil,nil);
HIDDeviceService.devices now contains 3 HIDDevices, the wacom tablet, my keyboard, and my trackpad. 
(
t = HIDDeviceService.devices.at(0);
[t.manufacturer, t.product, t.vendorID, t.productID, t.locID].postln;
t.elements.do({arg ele;
[ele.type, ele.usage, ele.cookie, ele.min, ele.max].postln;
});
)
returns:
[ Tablet, PTZ-631W, 1386, 181, 990904320 ]
[ Button Input, Button #1, 4, 0, 1 ]
[ Button Input, Button #2, 5, 0, 1 ]
[ Button Input, Button #3, 6, 0, 1 ]
[ Miscellaneous Input, X-Axis, 7, -127, 127 ]
[ Miscellaneous Input, Y-Axis, 8, -127, 127 ]
[ Miscellaneous Input, Wheel, 9, -127, 127 ]






On Dec 28, 2005, at 3:30 PM, tom tlalim wrote:

hi scott, that's strange!
the elements you've posted look like a full-feature mouse (three buttons, 2 axes, one wheel). you don't happen to have a mouse like this connected do you? could you post the code you're using?

in the help file for HIDDeviceService only the 1st device is queued.

to detect which device nr your tablet is do do this:
HIDDeviceService.devices.do{|src, i| src.product.find("Tablet").notNil.if{i.postln}  }

and then try this:

HIDDeviceService.action_({arg productID, vendorID, locID, cookie, val;
[productID, vendorID, locID, cookie, val].postln;
});

HIDDeviceService.devices.at(~tab).queueDevice;
HIDDeviceService.runEventLoop
Tried this, the action is never run, though if I do this for the trackpad or keyboard, it works perfectly.

Tried the HIDResponder class, and it didn't work any better.

Some thoughts:
Though I've been testing this with a stylus, it occurred to me that the device showing up on the HID list might represent the Wacom mouse, since it's elements seem more appropriate to that device. However, I get no response from the mouse either.

I presume you've actually had a wacom working through HIDDeviceService at some point? Any idea what I /ought/ to be seeing?

- Scott Carver


cheerz,
tom


On 28 Dec 2005, at 23:32, Scott Carver wrote:

Um, never mind. The wacom shows up on the list of HID devices just fine, but doesn't seem to be functional.
The device:
[ Tablet, PTZ-631W, 1386, 181, 454033408 ]
and it's elements:
[ Button Input, Button #1, 4, 0, 1 ]
[ Button Input, Button #2, 5, 0, 1 ]
[ Button Input, Button #3, 6, 0, 1 ]
[ Miscellaneous Input, X-Axis, 7, -127, 127 ]
[ Miscellaneous Input, Y-Axis, 8, -127, 127 ]
[ Miscellaneous Input, Wheel, 9, -127, 127 ]
My first impression was that these elements don't really seem appropriate to the tablet: it looks like the specs for a regular 3-button mouse, though it's for sure the tablet (the model # matches).
More importantly, after queuing the device and running the event loop (the setup used in the HIDDeviceService help file), the wacom doesn't generate any events.

- Scott

Worked like a charm, thanks a lot. 
- Scott Carver

On Dec 28, 2005, at 8:50 AM, tom tlalim wrote:

hi scott,
i don't have a wacom to test this but some devices appear on different usage page than the default (the mouse and keyboard for example)

if you want to search for devices on all usage / usagepages try the following:
HIDDeviceService.buildDeviceList(nil,nil) 
and please let us know if this worked...

grtz,
tom
_______________________________________________
sc-users mailing list

..................................
..................................


_______________________________________________
sc-users mailing list