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

# handleReport

Converts an incoming device report into dispatchable events.

```
virtual void handleReport(uint64_t timestamp, uint8_t *report, uint32_t reportLength, IOHIDReportType type, uint32_t reportID);
```

## Parameters

`timestamp`

The timestamp of the report.

`report`

A pointer to the raw bytes of the report.

`reportLength`

The number of bytes of data in the `report` parameter.

`type`

The report type.

`reportID`

The unique ID associated with the report. If a report element has new data, it contains this ID.

## Discussion

Implement a custom version of this method and use the <doc://com.apple.documentation/documentation/DriverKit/TYPE> macro to let the system know that your method conforms to this prototype.

In your custom implementation of this method, use the report data to gather the information you need to dispatch an appropriate event to the system. To simplify the parsing of the report data, use the [`getElements`](/documentation/HIDDriverKit/IOUserHIDEventService/getElements) method to populate a set of [`IOHIDElement`](/documentation/HIDDriverKit/IOHIDElement) objects with data from the report. You can then iterate over the elements to collect the data you need. Compare the report ID of each element to the value in the `reportID` parameter to determine which elements contain updated data. Dispatch events to the system using the methods of the [`IOHIDEventService`](/documentation/HIDDriverKit/IOHIDEventService) class, some of which this class overrides.

---

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)