Under macOS cmd-0, cmd-1 etc are free to use by applications.
If you like to know which shortcut keys are used by macOS, have a look at the keyboard settings (you can enable/disable systemwide shortcut keys there).
Thank you all for your replies
I don’t use this shortcuts/keydown on other controller, but the application reacts just like there are no menuhandler (just a beep).
Could it be that another controller is active and receives the menuhandler event, even if it’s not visible? It’s a bit strange because clicking on controls in the correct controller does not help. I have to click on menubar or another shortcut to make it work again. Just tried with command-V. I don’t have a menuhandler for this command, but it made command-2 work again! Command-Y did not help.