This works
Button(action: {
print("pressed")
}){
Text("Button")
}
.keyboardShortcut("B", modifiers: .command)
This doesn't
Button(action: {
print("pressed")
}){
Text("Button")
}
.buttonStyle(PlainButtonStyle())
.keyboardShortcut("B", modifiers: .command)
Has anyone else experienced this
Looks like a bug. However, if you use a lowercase "b"
it works as expected:
Button(action: {
print("pressed")
}) {
Text("Button")
}
.buttonStyle(PlainButtonStyle())
.keyboardShortcut("b", modifiers: .command)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With