Hi!
I want to use Option-Command-S for a "Save As…" menu but it does not work as expected. Other modifiers work well. (Xcode 14.3, macOS 13.5.2)
Here is the sample code:
import SwiftUI
struct ContentView: View {
var body: some View {
Text("Hello, world!")
}
}
@main
struct kbTestApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
.commands {
CommandGroup(replacing: CommandGroupPlacement.newItem) {
Button("None") { }
Button("Command") { }
.keyboardShortcut("s", modifiers: [.command])
Button("Option"){ }
.keyboardShortcut("s", modifiers: [.option])
Button("Shift Command"){ }
.keyboardShortcut("s", modifiers: [.shift, .command])
Button("Option Command"){ }
.keyboardShortcut("s", modifiers: [.option, .command])
Button("Shift Option Command"){ }
.keyboardShortcut("s", modifiers: [.shift, .option, .command])
}
}
}
}
The menu is:
Do I miss something here or is it a SwiftUI bug?
PS: Using Xcode 15 beta 8 makes no difference.