<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/KeyboardShortcut/defaultAction",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI16KeyboardShortcutV13defaultActionACvpZ"
  },
  "title" : "defaultAction"
}
-->

# defaultAction

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

```
static let defaultAction: KeyboardShortcut
```

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)