---
title: key
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/keyboardshortcut/key
---

# key

The key equivalent that the user presses in conjunction with any specified modifier keys to activate the shortcut.

## Declaration

```swift
var key: KeyEquivalent
```

## See Also

### Creating a shortcut

- [init(_:modifiers:)](swiftui/keyboardshortcut/init(_:modifiers:).md)
- [modifiers](swiftui/keyboardshortcut/modifiers.md)
