<!--
{
  "availability" : [
    "DriverKit: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "HIDDriverKit",
  "identifier" : "/documentation/HIDDriverKit/IOHIDDigitizerStylusData",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "HIDDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOHIDDigitizerStylusData"
  },
  "title" : "IOHIDDigitizerStylusData"
}
-->

# IOHIDDigitizerStylusData

A structure containing digitizer stylus data.

```
typedef struct IOHIDDigitizerStylusData { ... } IOHIDDigitizerStylusData;
```

## Overview

When dispatching stylus events, allocate an `IOHIDDigitizerStylusData` structure, fill it with stylus data, and pass it to the [`dispatchDigitizerStylusEvent`](/documentation/HIDDriverKit/IOHIDEventService/dispatchDigitizerStylusEvent) method.

## Topics

### Getting the Stylus Data

[`uint32_t identifier;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/identifier)

A unique stylus identifier.

[`IOFixed x;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/x)

An x-axis value in the range `0.0` to `1.0`.

[`IOFixed y;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/y)

A y-axis value in the range `0.0` to `1.0`.

[`IOFixed tipPressure;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/tipPressure)

A tip pressure value in the range `0.0` to `1.0`.

[`IOFixed barrelPressure;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/barrelPressure)

The barrel pressure value in the range `0.0` to `1.0`.

[`IOFixed tiltX;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/tiltX)

The tilt of the stylus across the x-axis.

[`IOFixed tiltY;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/tiltY)

The tilt of the stylus across the y-axis.

[`IOFixed twist;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/twist)

The clockwise rotation of the stylus.

[`uint32_t pointerType;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/pointerType)

An optional pointer type defined by vendor.

[`uint32_t effect;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/effect)

An optional stylus effect defined by vendor.

[`uint64_t uniqueID;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/uniqueID)

An optional unique identifier for the stylus.

[`uint32_t inRange;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/inRange)

A single-bit Boolean that indicates whether the stylus is in range.

[`uint32_t tip;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/tip)

A single-bit Boolean that indicates whether the tip of the stylus is in contact with the surface of the digitizer.

[`uint32_t barrelSwitch;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/barrelSwitch)

A single-bit Boolean that indicates whether the barrel switch button is pressed.

[`uint32_t invert;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/invert)

A single-bit Boolean that indicates whether the stylus is inverted.

[`uint32_t eraser;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/eraser)

A Boolean value that indicates whether the inverted stylus is in contact with the surface of the digitizer.

[`uint32_t tipChanged;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/tipChanged)

A single-bit Boolean that indicates whether the tip contact status changed since the last event was dispatched.

[`uint32_t positionChanged;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/positionChanged)

A single-bit Boolean that indicates whether the x or y position changed since the last event was dispatched.

[`uint32_t rangeChanged;`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData/rangeChanged)

A single-bit Boolean that indicates whether the in-range status changed since the last event was dispatched.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)