skip to Main Content

Xcode – SwiftUI's keyboardShortcut is not working if Button has a buttonStyle

My code: Button(action: { AudioServicesPlaySystemSound(1026) isActive.toggle() }){ HStack{ Image(systemName: "trash") Text("delete") } } .foregroundColor(.red) .font(.body) .keyboardShortcut("b",modifiers: []) in this stage keyboardShortcut is working but when I add buttonStyle keyboardShortcut is not working code with buttonStyle: Button(action: { AudioServicesPlaySystemSound(1026) isActive.toggle() }){…

VIEW QUESTION
Back To Top
Search