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()
}){
HStack{
Image(systemName: "trash")
Text("delete")
}
}
.buttonStyle(PlainButtonStyle())
.foregroundColor(.red)
.font(.body)
.keyboardShortcut("b",modifiers: [])