---
title: dispatchRelativePointerEvent
framework: hiddriverkit
role: symbol
role_heading: Instance Method
path: hiddriverkit/iohideventservice/dispatchrelativepointerevent
---

# dispatchRelativePointerEvent

Dispatches a relative pointer event to the system.

## Declaration

```occ
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 doc://com.apple.hiddriverkit/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

Return Value kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.

## Discussion

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.

## See Also

### Dispatching Events

- [dispatchKeyboardEvent](hiddriverkit/iohideventservice/dispatchkeyboardevent.md)
- [dispatchAbsolutePointerEvent](hiddriverkit/iohideventservice/dispatchabsolutepointerevent.md)
- [dispatchDigitizerStylusEvent](hiddriverkit/iohideventservice/dispatchdigitizerstylusevent.md)
- [dispatchDigitizerTouchEvent](hiddriverkit/iohideventservice/dispatchdigitizertouchevent.md)
- [dispatchRelativeScrollWheelEvent](hiddriverkit/iohideventservice/dispatchrelativescrollwheelevent.md)
- [dispatchEvent](hiddriverkit/iohideventservice/dispatchevent.md)
- [IOHIDKeyboardEventOptions](hiddriverkit/iohidkeyboardeventoptions.md)
- [IOHIDPointerEventOptions](hiddriverkit/iohidpointereventoptions.md)
- [IOHIDScrollEventOptions](hiddriverkit/iohidscrolleventoptions.md)
