| Previous | Next |
| ERROR_WINDOW_OF_OTHER_THREAD | ERROR_CLASS_ALREADY_EXISTS |
ERROR_HOTKEY_ALREADY_REGISTERED
The key combination is already registered
RegisterHotKey asks the window manager to route a system-wide key combination to a window or thread as WM_HOTKEY. Registration is therefore a shared namespace for key combinations, not merely a local keyboard setting.
The API typically fails when the same keystrokes are already registered for another hot key. Some operating-system shortcuts are reserved, and the Windows-logo combinations are generally reserved for the OS. The F12 key is reserved for the debugger.
What to check
- Log modifiers and virtual-key code, not just the application's logical command name.
- Unregister the old binding during reconfiguration before claiming the replacement combination.
- Test for conflicts with another instance of the same application.
- Choose a configurable fallback rather than repeatedly retrying the same combination.
ERROR_HOTKEY_NOT_REGISTERED is the opposite lifecycle problem: code tries to remove a registration that is not present for the caller.
References
Looking for a different code? Search another status or error code.