In the latest version of the macOS 15.1 Beta, your demo was tested to be effective by me. However, when I created a new project, the shortcut keys became ineffective. Then, when I used it in the macOS 14, the shortcut keys were still effective.
I finally discovered that the difference, where an error code would be returned and the eventHotKey is nil.

In the latest version of the macOS 15.1 Beta, your demo was tested to be effective by me. However, when I created a new project, the shortcut keys became ineffective. Then, when I used it in the macOS 14, the shortcut keys were still effective.
I finally discovered that the difference, where an error code would be returned and the eventHotKey is nil.