---
title: HIDDeviceClient
framework: corehid
role: symbol
role_heading: Class
path: corehid/hiddeviceclient
---

# HIDDeviceClient

A client of a physical or virtual HID compatible peripheral.

## Declaration

```swift
actor HIDDeviceClient
```

## Mentioned in

Communicating with human interface devices Creating virtual devices

## Overview

Overview A human interface device (HID) is a computer peripheral intended to provide direction to the system from human input. The specification is a broad, industry-wide standard, maintained by the USB Implementers Forum. For more details, see Human Interface Devices (HID) Specifications and Tools. A HIDDeviceClient is a connection to one HID device on the system. It’s created using a HIDDeviceClient.DeviceReference, received from a HIDDeviceManager. A HIDDeviceClient.DeviceReference is a simple reference to a specific HID device. The HID peripheral can be a USB device like a wired mouse, a Bluetooth device like a wireless keyboard, an onboard sensor like an accelerometer, or even a software based, virtual peripheral created using HIDVirtualDevice. A HIDDeviceClient receives device notifications, such as input HID reports that are dispatched from the device in response to human input (like a keyboard key press) in monitorNotifications(reportIDsToMonitor:elementsToMonitor:). It sends get and set reports to the device to retrieve information or configure device functionality using dispatchSetReportRequest(type:id:data:timeout:). dispatchGetReportRequest(type:id:timeout:). It monitors or updates specific pieces of the HID report using HIDElement.

## Topics

### Create a device client

- [init(deviceReference:)](corehid/hiddeviceclient/init(devicereference:).md)
- [HIDDeviceClient.DeviceReference](corehid/hiddeviceclient/devicereference-swift.struct.md)
- [deviceReference](corehid/hiddeviceclient/devicereference-swift.property.md)

### Get device information

- [descriptor](corehid/hiddeviceclient/descriptor.md)
- [deviceUsages](corehid/hiddeviceclient/deviceusages.md)
- [isBuiltIn](corehid/hiddeviceclient/isbuiltin.md)
- [localizationCode](corehid/hiddeviceclient/localizationcode.md)
- [locationID](corehid/hiddeviceclient/locationid.md)
- [manufacturer](corehid/hiddeviceclient/manufacturer.md)
- [modelNumber](corehid/hiddeviceclient/modelnumber.md)
- [primaryUsage](corehid/hiddeviceclient/primaryusage.md)
- [product](corehid/hiddeviceclient/product.md)
- [productID](corehid/hiddeviceclient/productid.md)
- [serialNumber](corehid/hiddeviceclient/serialnumber.md)
- [transport](corehid/hiddeviceclient/transport.md)
- [uniqueID](corehid/hiddeviceclient/uniqueid.md)
- [vendorID](corehid/hiddeviceclient/vendorid.md)
- [versionNumber](corehid/hiddeviceclient/versionnumber.md)
- [elements](corehid/hiddeviceclient/elements.md)

### Interact with the device

- [dispatchGetReportRequest(type:id:timeout:)](corehid/hiddeviceclient/dispatchgetreportrequest(type:id:timeout:).md)
- [dispatchSetReportRequest(type:id:data:timeout:)](corehid/hiddeviceclient/dispatchsetreportrequest(type:id:data:timeout:).md)
- [seizeDevice()](corehid/hiddeviceclient/seizedevice().md)

### Monitor device notifications

- [monitorNotifications(reportIDsToMonitor:elementsToMonitor:)](corehid/hiddeviceclient/monitornotifications(reportidstomonitor:elementstomonitor:).md)
- [HIDDeviceClient.Notification](corehid/hiddeviceclient/notification.md)

### Update element values

- [updateElements(_:timeout:)](corehid/hiddeviceclient/updateelements(_:timeout:).md)
- [HIDDeviceClient.RequestElementUpdate](corehid/hiddeviceclient/requestelementupdate.md)
- [HIDDeviceClient.ProvideElementUpdate](corehid/hiddeviceclient/provideelementupdate.md)
- [HIDDeviceClient.HIDElementUpdateResult](corehid/hiddeviceclient/hidelementupdateresult.md)

### Structures

- [HIDDeviceClient.UnsafeProperty](corehid/hiddeviceclient/unsafeproperty.md)

### Subscripts

- [subscript(_:)](corehid/hiddeviceclient/subscript(_:).md)

## Relationships

### Conforms To

- [Actor](swift/actor.md)
- [Copyable](swift/copyable.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Interaction

- [Communicating with human interface devices](corehid/communicatingwithhiddevices.md)
- [HIDElement](corehid/hidelement.md)
- [HIDElementCollection](corehid/hidelementcollection.md)
- [HIDElement.Value](corehid/hidelement/value.md)
- [HIDElementUpdate](corehid/hidelementupdate.md)
- [HIDReportType](corehid/hidreporttype.md)
- [HIDReportID](corehid/hidreportid.md)
- [HIDUsage](corehid/hidusage.md)
- [HIDDeviceError](corehid/hiddeviceerror.md)
- [HIDDeviceTransport](corehid/hiddevicetransport.md)
- [HIDDeviceLocalizationCode](corehid/hiddevicelocalizationcode.md)
