<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreHID",
  "identifier" : "/documentation/CoreHID/HIDDeviceClient/subscript(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "Core HID"
    ],
    "preciseIdentifier" : "s:7CoreHID15HIDDeviceClientCyAC14UnsafePropertyVSgSScip"
  },
  "title" : "subscript(_:)"
}
-->

# subscript(_:)

Get or set a property from the device.

```
subscript(key: String) -> HIDDeviceClient.UnsafeProperty? { get set }
```

## Parameters

`key`

The property to get or set. Supported properties are device implementation specific.

## Return Value

The value of the requested property, if any. The return type and value are device implementation specific.

## Overview

Properties can be inherently present on the device, or set manually. Any number of properties can be valid or invalid and return varying types, depending on the device specific implementation. Properties are typically only for advanced use cases when it’s known exactly what is returned when queried, or exactly what happens when set for a specific device.

Note: These methods are unsafe, as the returned type is unchecked `Sendable` for possibly non-Sendable objects. Concurrency safety is the responsibility of the developer.

---

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)