comparison src/video/cocoa/SDL_cocoakeyboard.m @ 1960:118daa3a24cc

Added numlock support
author Sam Lantinga <slouken@libsdl.org>
date Sun, 30 Jul 2006 06:11:24 +0000
parents 25d6537feea4
children f42f10fc309e
comparison
equal deleted inserted replaced
1959:25d6537feea4 1960:118daa3a24cc
421 421
422 if (oldMask != newMask) { 422 if (oldMask != newMask) {
423 SDL_SendKeyboardKey(keyboard, SDL_PRESSED, (Uint8)scancode, SDLK_CAPSLOCK); 423 SDL_SendKeyboardKey(keyboard, SDL_PRESSED, (Uint8)scancode, SDLK_CAPSLOCK);
424 SDL_SendKeyboardKey(keyboard, SDL_RELEASED, (Uint8)scancode, SDLK_CAPSLOCK); 424 SDL_SendKeyboardKey(keyboard, SDL_RELEASED, (Uint8)scancode, SDLK_CAPSLOCK);
425 } 425 }
426
427 oldMask = oldMods & NSNumericPadKeyMask;
428 newMask = newMods & NSNumericPadKeyMask;
429
430 if (oldMask != newMask) {
431 SDL_SendKeyboardKey(keyboard, SDL_PRESSED, (Uint8)scancode, SDLK_NUMLOCK);
432 SDL_SendKeyboardKey(keyboard, SDL_RELEASED, (Uint8)scancode, SDLK_NUMLOCK);
433 }
426 } 434 }
427 435
428 /* This function will handle the modifier keys and also determine the 436 /* This function will handle the modifier keys and also determine the
429 * correct side of the key. 437 * correct side of the key.
430 */ 438 */