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

# dispatchRelativePointerEvent

Dispatches a relative pointer event to the system.

```
virtual kern_return_t dispatchRelativePointerEvent(uint64_t timeStamp, IOFixed dx, IOFixed dy, uint32_t buttonState, IOOptionBits options, bool accelerate);
```

## Parameters

`timeStamp`

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

`dx`

The distance traveled along the X axis, relative to the pointer’s previous location.

`dy`

The distance traveled along the Y axis, relative to the pointer’s previous location.

`buttonState`

The button state, if any.

`options`

Additional options for pointer events. Specify `0` for no options. For a list of other values, see [`IOHIDPointerEventOptions`](/documentation/HIDDriverKit/IOHIDPointerEventOptions).

`accelerate`

A Boolean value indicating whether to apply the acceleration algorithm to the pointer event. Specify `false` if you don’t want to apply that logic.

## 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

Call this method from your event service to dispatch a keyboard event to the system. Typically, you call this method after determining that a report contains data representing a mouse- or pointer-related event.

---

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)