---
title: HIDVirtualDevice
framework: corehid
role: symbol
role_heading: Class
path: corehid/hidvirtualdevice
---

# HIDVirtualDevice

A virtual service to emulate a HID device connected to the system.

## Declaration

```swift
actor HIDVirtualDevice
```

## Mentioned in

Creating virtual devices

## Overview

Overview A HID device 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. A HIDVirtualDevice is an object that emulates a HID device connected to the system, without the need for a physical device. Such a tool can be used by an app to emulate a keyboard and dispatch HID reports to the system using dispatchInputReport(data:timestamp:) that signify key strokes, and could be received by a HIDDeviceClientlistening for such activity in other apps. The virtual device can also receive requests from the system using its HIDVirtualDeviceDelegate.

## Topics

### Create a HID virtual device

- [init(properties:)](corehid/hidvirtualdevice/init(properties:).md)
- [deviceReference](corehid/hidvirtualdevice/devicereference.md)
- [activate(delegate:)](corehid/hidvirtualdevice/activate(delegate:).md)

### Dispatch input reports

- [dispatchInputReport(data:timestamp:)](corehid/hidvirtualdevice/dispatchinputreport(data:timestamp:).md)

### Structures

- [HIDVirtualDevice.Properties](corehid/hidvirtualdevice/properties.md)

### Instance Properties

- [hidDevice](corehid/hidvirtualdevice/hiddevice.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

### Simulation

- [Creating virtual devices](corehid/creatingvirtualdevices.md)
- [HIDVirtualDeviceDelegate](corehid/hidvirtualdevicedelegate.md)
- [HIDVirtualDevice.Properties](corehid/hidvirtualdevice/properties.md)
