Single window keyboard shortcut

I made a macOS document-based app that has a second scene that's a Window. It's name appears in the single window list of the Windows menu, but has no assigned shortcut. I've tried the following to assign a shortcut to it, but it doesn't add a "⌘L" as I want:

Window("Logs", id: "logs") {
    LogsView()
}
.keyboardShortcut("l")

I can brute-force this using .commands to replace the menu item but that seems crude and unnecessary. Is it the only way?

Answered by DTS Engineer in 821478022

@LogicalLight That's odd, I wan't able to reproduce this. Could you please submit a bug report via Feedback assistant and post the Feedback Number here for the record.

In the bug report please specify the OS version number and Xcode build you tested on. Thanks

Accepted Answer

@LogicalLight That's odd, I wan't able to reproduce this. Could you please submit a bug report via Feedback assistant and post the Feedback Number here for the record.

In the bug report please specify the OS version number and Xcode build you tested on. Thanks

Grr. Seriously, this was not working when I posted. Even after cleans and rebuilds. But now... it works. I even made a demo app, but it works there too. So to quote Emily, "Nevermind!"

Single window keyboard shortcut
 
 
Q