---
title: "onMoveCommand(perform:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/onmovecommand(perform:)"
---

# onMoveCommand(perform:)

Adds an action to perform in response to a move command, like when the user presses an arrow key on a Mac keyboard, or taps the edge of the Siri Remote when controlling an Apple TV.

## Declaration

```swift
nonisolated func onMoveCommand(perform action: ((MoveCommandDirection) -> Void)?) -> some View

```

## See Also

### Responding to commands

- [onDeleteCommand(perform:)](swiftui/view/ondeletecommand(perform:).md)
- [pageCommand(value:in:step:)](swiftui/view/pagecommand(value:in:step:).md)
- [onExitCommand(perform:)](swiftui/view/onexitcommand(perform:).md)
- [onPlayPauseCommand(perform:)](swiftui/view/onplaypausecommand(perform:).md)
- [onCommand(_:perform:)](swiftui/view/oncommand(_:perform:).md)
- [MoveCommandDirection](swiftui/movecommanddirection.md)
