The keyboard shortcut does not work on the iPadOS 14 simulator using following the code.
Would you please help us to know what's the problem? From the WWDC session "What's new in SwiftUI", the keyboard shortcut should work on iPad.
Thank you.
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
Text("Demo Keyboard Shotcuts")
}
.commands {
CommandGroup(before: .sidebar) {
Button("Test Keyboard", action: { print("keyboard shortcut - command + k") })
.keyboardShortcut("[")
}
}
}
}
Would you please help us to know what's the problem? From the WWDC session "What's new in SwiftUI", the keyboard shortcut should work on iPad.
Thank you.