macOS 11.0 / iOS 14:
As of Xcode 12 beta, new methods are exposed on Button() allowing assignment of keyEquivalent (either by enum case or explicit key and modifiers).
Setting as default:
Button( ... )
.keyboardShortcut(.defaultAction)
Setting as cancel:
Button( ... )
.keyboardShortcut(.cancelAction)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…