• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Tablet events from ordinary touchpad?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: an app that never quits
  • Next by Date: Capturing content programatically
  • Previous by thread: Re: an app that never quits
  • Next by thread: Re: Tablet events from ordinary touchpad?
  • Index(es):
    • Date
    • Thread