---
title: defaultAction
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/keyboardshortcut/defaultaction
---

# defaultAction

The standard keyboard shortcut for the default button, consisting of the Return (↩) key and no modifiers.

## Declaration

```swift
static let defaultAction: KeyboardShortcut
```

## Discussion

Discussion On macOS, the default button is designated with special coloration. If more than one control is assigned this shortcut, only the first one is emphasized.

## See Also

### Getting standard shortcuts

- [cancelAction](swiftui/keyboardshortcut/cancelaction.md)
