---
title: keyboardMetrics
framework: sensorkit
role: symbol
role_heading: Type Property
path: sensorkit/srsensor/keyboardmetrics
---

# keyboardMetrics

A sensor that provides information about keyboard usage.

## Declaration

```swift
static let keyboardMetrics: SRSensor
```

## Discussion

Discussion The sample type for this sensor is SRKeyboardMetrics. You need to provide a reason to record keyboard metrics by adding the SRSensorUsageKeyboardMetrics dictionary to the NSSensorKitUsageDetail key in the information property list.

## See Also

### Reading device sensors

- [deviceUsageReport](sensorkit/srsensor/deviceusagereport.md)
- [onWristState](sensorkit/srsensor/onwriststate.md)
