|
|
|
|
|
by Hamuko
714 days ago
|
|
Annoyingly enough you don't really all keyboard shortcuts out of the box even if you build natively. If you create a Button(role: .destructive).keyboardShortcut(.defaultAction) in a SwiftUI dialog, you don't get Cmd+D as the shortcut even though Finder (and I think other apps too) uses Cmd+D as the keyboard shortcut for destructive confirmation dialogs. Thankfully at least a Button without destructive role will get Enter as its keyboard shortcut in the same context. |
|