I want to register kVK_ANSI_Keypad1 hot key, but it returns -9868. What does this return value mean?
RegisterEventHotKey failed
Registration failed, check your inHotKeyModifiers parameter
UInt32 keyCode = kVK_ANSI_Keypad1;
EventHotKeyID gMyHotKeyID;
gMyHotKeyID.signature = (FourCharCode)'1234';
gMyHotKeyID.id = 1;
EventHotKeyRef hotKeyRef;
OSStatus status = RegisterEventHotKey(keyCode, cmdKey, gMyHotKeyID, GetApplicationEventTarget(), 0, &hotKeyRef);
if (status == noErr) {
NSLog(@"success!");
} else {
NSLog(@"fail:%d", status);
}