using a Wacom from Cocoa - buttons other than 0...
using a Wacom from Cocoa - buttons other than 0...
- Subject: using a Wacom from Cocoa - buttons other than 0...
- From: "Michael B. Johnson" <email@hidden>
- Date: Sun, 27 Jan 2002 21:46:09 -0800
I know that this is almost a support question for Wacom, but I realized
that I don't really know what to tell them, so I thought I'd sanity
check here first...
I have a Wacom tablet with a pen and 3 button mouse, and wrote a quicky
little sketch program this weekend. As part of that, I read the
pressure from the NSEvent coming in, and that works swimmingly to modify
the stroke I'm laying down.
I then wanted to be able to flip over my pen and use the eraser, and in
typical UNIX-guy fashion, I thought of it as "draw with button 0, so
erase with button 2" (i.e. I tend to think that I have 3 buttons for my
mouse, which all of my mice plugged into all my computers do). So I saw
that the NSEvent had a way to get what button was being pressed, so I
ran my sketch program and tried my mouse and pen, clicking all the
various buttons; all of which were reported as button 0. I looked at
the control panel from Wacom, but the only sort of modifiers are things
like ctrl and such.
So I realize that I'm potentially treading on sacred ground here, but is
the notion of more than one button a purely Cocoa thing (since NeXT had
at least a 2 button mouse) that Carbon doesn't have? This can't be
true, right? So what do I tell a device manufacturer that wants to
allow one of the mappings of their device to be button n, where n > 0?
--> Michael B. Johnson, Ph.D. -- email@hidden
--> Studio Tools, Pixar Animation Studios
-->
http://xenia.media.mit.edu/~wave