---
title: "removeKeyCommand(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiviewcontroller/removekeycommand(_:)"
---

# removeKeyCommand(_:)

Removes the key command from the view controller.

## Declaration

```swift
func removeKeyCommand(_ keyCommand: UIKeyCommand)
```

## Parameters

- `keyCommand`: The key command to remove.

## Discussion

Discussion This method lets you easily remove key commands without overriding the keyCommands property.

## See Also

### Related Documentation

- [keyCommands](uikit/uiresponder/keycommands.md)

### Accessing the available key commands

- [performsActionsWhilePresentingModally](uikit/uiviewcontroller/performsactionswhilepresentingmodally.md)
- [addKeyCommand(_:)](uikit/uiviewcontroller/addkeycommand(_:).md)
