Number pad keyboard shortcuts

I have a macOS app that allows users to type in numbers which I originally used a custom NSWindow for but now using .keyboardShortcut(_:modifiers:).

I’ve put a CommandMenu in the App file attached to the WindowGroup Scene but then that appears in the menu bar at the top. Every time one of the keys are pressed the menu bar section flashes which can get quite distracting.

Is there a way that you can add a CommandMenu or just the keyboard shortcuts so they are not in the menu bar or at least not visible to the user?

Code Block Swift
.commands {
CommandMenu("Keyboard") {
Group {
Button("0") { print("0") }
.keyboardShortcut("0", modifiers: .numberPad)
... // 1 to 8
Button("9") { print("9") }
.keyboardShortcut("9", modifiers: .numberPad)
}
Button("Delete") { print("delete") }
.keyboardShortcut(.delete, modifiers: .numberPad)
Button("Enter") { print("enter") }
.keyboardShortcut(.return, modifiers: .numberPad)
}
}

Number pad keyboard shortcuts
 
 
Q