<!--
{
  "availability" : [
    "driverkit: 19.0.0 -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "HIDDriverKit",
  "identifier" : "/documentation/HIDDriverKit/IOHIDEventService/dispatchDigitizerStylusEvent",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HIDDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOHIDEventService@F@dispatchDigitizerStylusEvent#k#*$@S@IOHIDDigitizerStylusData#"
  },
  "title" : "dispatchDigitizerStylusEvent"
}
-->

# dispatchDigitizerStylusEvent

Dispatches a digitizer stylus event to the system.

```
virtual kern_return_t dispatchDigitizerStylusEvent(uint64_t timeStamp, IOHIDDigitizerStylusData *stylusData);
```

## Parameters

`timeStamp`

The timestamp of the event. Use the timestamp of the report element that is the source of the event.

`stylusData`

A structure containing the stylus data. For more information, see [`IOHIDDigitizerStylusData`](/documentation/HIDDriverKit/IOHIDDigitizerStylusData).

## Return Value

<doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> on success, or another value if an error occurs. See <doc://com.apple.documentation/documentation/DriverKit/error-codes>.

## Discussion

The default implementation of this method does nothing. Subclasses must override it to dispatch stylus events.

---

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)