Commit ef1639f2 authored by Sam Lantinga's avatar Sam Lantinga

Added numlock support

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402006
parent f5ebc5ae
......@@ -25,6 +25,7 @@
#define _SDL_cocoakeyboard_h
extern void Cocoa_InitKeyboard(_THIS);
extern void Cocoa_HandleKeyEvent(_THIS, NSEvent *event);
extern void Cocoa_QuitKeyboard(_THIS);
#endif /* _SDL_cocoakeyboard_h */
......
......@@ -423,6 +423,14 @@ HandleCapsLock(int keyboard, unsigned short scancode,
SDL_SendKeyboardKey(keyboard, SDL_PRESSED, (Uint8)scancode, SDLK_CAPSLOCK);
SDL_SendKeyboardKey(keyboard, SDL_RELEASED, (Uint8)scancode, SDLK_CAPSLOCK);
}
oldMask = oldMods & NSNumericPadKeyMask;
newMask = newMods & NSNumericPadKeyMask;
if (oldMask != newMask) {
SDL_SendKeyboardKey(keyboard, SDL_PRESSED, (Uint8)scancode, SDLK_NUMLOCK);
SDL_SendKeyboardKey(keyboard, SDL_RELEASED, (Uint8)scancode, SDLK_NUMLOCK);
}
}
/* This function will handle the modifier keys and also determine the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment