---
title: "keyUp(with:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/nshostingview/keyup(with:)"
---

# keyUp(with:)

Called when the user releases a key on the keyboard while this view is in the responder chain.

## Declaration

```swift
@MainActor @preconcurrency override dynamic func keyUp(with event: NSEvent)
```

## See Also

### Managing keyboard interaction

- [keyDown(with:)](swiftui/nshostingview/keydown(with:).md)
- [performKeyEquivalent(with:)](swiftui/nshostingview/performkeyequivalent(with:).md)
- [insertText(_:)](swiftui/nshostingview/inserttext(_:).md)
- [didChangeValue(forKey:)](swiftui/nshostingview/didchangevalue(forkey:).md)
- [makeTouchBar()](swiftui/nshostingview/maketouchbar().md)
