The Wacom tablet driver provides information through the standard NSEvent mechanism. This means that by default any actions on a tablet are posted as mouse events (with appropriate subtype data), keystroke events, etc. Thus if your application does not need or want tablet specific data, it will still function seamlessly with a Wacom tablet. If you want to take advantage of the additional information a Wacom tablet can provide, such as pressure, tilt, rotation, etc., there is additional information available to your application (an example of how to get this information can be found in the ScribbleDemo event handling).
Wacom specific behavior
If your application only wants tablet events without cursor movement, the driver can be instructed to send only tablet events. Details of how to do this are documented in Driver Request Interface.
When a user brings a pen into or out of range of the tablet an NSEventTypeTabletProximity event is posted before a mouseDown and after a mouseUp, if appropriate. This allows your application to detect when a pen enters or leaves proximity of the tablet if you need to do any additional processing in those circumstances.
This is not a comprehensive list of event fields. The fields listed here are those that have special considerations beyond the NSEvent documentation. For example, some of the event data fields are only used by specific devices. If you don't have those devices, the fields will always return a zero value.
0 to tablet width in counts. The width counts depend on model and size of tablet.
- This is the X coordinate of the device on the tablet.
- If you really want to do the scaling yourself, then use this value (see the Driver Request Interface Reference page's Tablet Properties table for information on getting the width of the tablet).
0 to tablet height in counts. The height counts depend on model and size of tablet.
- This is the Y coordinate of the device on the tablet.
- If you really want to do the scaling yourself, then use this value (see Driver Request Interface for information on getting the height of the tablet).
The Wacom Art Pen is the only pen that currently supports rotation. Rotation is the angle between the "front" of the pen and the top of the tablet. This does not mean much for mice that support rotation; however, it is very important for styli.
For styli, this rotation is different than "twisting" the barrel of the pen. While twisting the barrel of the pen does cause a rotation change, the rotation can change without actually twisting the barrel of the pen. For example, hold the pen upright with side-switch buttons pointed towards the top of the tablet. Now fully tilt the pen to the left. Rotate the pen so that the end is pointing down. Finally, tilt the pen back upright. Notice how the side switches are rotated 90° from where they started and that you never physically twisted the barrel of pen.
This is another pressure field a device can have. It is also often referred to as barrel pressure. The wheel on the Airbrush tool is the only tool that reports tangential pressure.
Wacom reports the tangential pressure as follows: 0 is the neutral position. The Airbrush's tangential pressure wheel can only move in the positive direction from the neutral position. (Fingerwheel all the way to the front is neutral.)