Tablet events from ordinary touchpad?
Tablet events from ordinary touchpad?
- Subject: Tablet events from ordinary touchpad?
- From: Sander Stoks <email@hidden>
- Date: Sat, 19 Sep 2009 14:07:55 +0200
Hello all,
In a program I'm writing, I'm getting nice results from my Wacom
tablet. However, I can't discern between "ordinary" mouse drags (via
the trackpad on my MBP) and "real" Wacom events. The reason I want to
do this is because the normal mouse events seem to have a bogus
"pressure" value (less than 1) so my brush strokes are way too light
when using the mouse.
I obviously tried this:
-(void)mouseDown:(NSEvent*)event
{
NSPoint p = [self convertPoint:[event locationInWindow] fromView:nil];
Event e; // my own event type, not relevant to the discussion
e.point = *(CGPoint*)&p;
NSPoint tilt = [event tilt];
e.tilt = [event subtype] == NSTabletPointEventSubtype ? *(CGPoint*)
&tilt : CGPointMake(0, 0);
e.pressure = [event subtype] == NSTabletPointEventSubtype ? [event
pressure] : 1.0;
DocModel *doc = [self docModel];
doc->MouseDown(e);
}
but for some reason, the event subtype is always
NSTabletPointEventSubtype.
I tried overriding tabletProximity, but it never gets called.
I'm kind of stuck here, so I'm hoping you can provide me with some
pointers...
Many thanks in advance,
Sander Stoks
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden