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

# conformsTo

```
virtual bool conformsTo(uint32_t usagePage, uint32_t usage);
```

## Parameters

`usagePage`

The usage page to check for conformity.

`usage`

The usage to check for conformity.

## Return Value

Returns a bool specifying if the element conforms to the provided usage page and usage.

## Discussion

Checks if the element conforms to the provided usage page and usage somewhere in its hierarchy.

---

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)