Mercurial > sdl-ios-xcode
comparison src/video/maccommon/SDL_macevents.c @ 10:ee3bb7cd06b5
Fixed left arrow on iBook keyboard under MacOS X
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Sat, 28 Apr 2001 18:56:58 +0000 |
parents | 74212992fb08 |
children | 2d162219f433 |
comparison
equal
deleted
inserted
replaced
9:a1c15fa4abb9 | 10:ee3bb7cd06b5 |
---|---|
457 int i; | 457 int i; |
458 | 458 |
459 /* Map the MAC keysyms */ | 459 /* Map the MAC keysyms */ |
460 for ( i=0; i<SDL_TABLESIZE(MAC_keymap); ++i ) | 460 for ( i=0; i<SDL_TABLESIZE(MAC_keymap); ++i ) |
461 MAC_keymap[i] = SDLK_UNKNOWN; | 461 MAC_keymap[i] = SDLK_UNKNOWN; |
462 | |
463 /* Wierd, these keys are on my iBook under MacOS X */ | |
464 MAC_keymap[MK_IBOOK_ENTER] = SDLK_KP_ENTER; | |
465 MAC_keymap[MK_IBOOK_RIGHT] = SDLK_RIGHT; | |
466 MAC_keymap[MK_IBOOK_DOWN] = SDLK_DOWN; | |
467 MAC_keymap[MK_IBOOK_UP] = SDLK_UP; | |
468 MAC_keymap[MK_IBOOK_LEFT] = SDLK_LEFT; | |
469 | 462 |
470 /* Defined MAC_* constants */ | 463 /* Defined MAC_* constants */ |
471 MAC_keymap[MK_ESCAPE] = SDLK_ESCAPE; | 464 MAC_keymap[MK_ESCAPE] = SDLK_ESCAPE; |
472 MAC_keymap[MK_F1] = SDLK_F1; | 465 MAC_keymap[MK_F1] = SDLK_F1; |
473 MAC_keymap[MK_F2] = SDLK_F2; | 466 MAC_keymap[MK_F2] = SDLK_F2; |
575 MAC_keymap[MK_LEFT] = SDLK_LEFT; | 568 MAC_keymap[MK_LEFT] = SDLK_LEFT; |
576 MAC_keymap[MK_DOWN] = SDLK_DOWN; | 569 MAC_keymap[MK_DOWN] = SDLK_DOWN; |
577 MAC_keymap[MK_RIGHT] = SDLK_RIGHT; | 570 MAC_keymap[MK_RIGHT] = SDLK_RIGHT; |
578 MAC_keymap[MK_KP0] = SDLK_KP0; | 571 MAC_keymap[MK_KP0] = SDLK_KP0; |
579 MAC_keymap[MK_KP_PERIOD] = SDLK_KP_PERIOD; | 572 MAC_keymap[MK_KP_PERIOD] = SDLK_KP_PERIOD; |
573 | |
574 #if defined(__APPLE__) && defined(__MACH__) | |
575 /* Wierd, these keys are on my iBook under MacOS X | |
576 Note that the left arrow keysym is the same as left ctrl!? | |
577 */ | |
578 MAC_keymap[MK_IBOOK_ENTER] = SDLK_KP_ENTER; | |
579 MAC_keymap[MK_IBOOK_RIGHT] = SDLK_RIGHT; | |
580 MAC_keymap[MK_IBOOK_DOWN] = SDLK_DOWN; | |
581 MAC_keymap[MK_IBOOK_UP] = SDLK_UP; | |
582 MAC_keymap[MK_IBOOK_LEFT] = SDLK_LEFT; | |
583 #endif /* MacOS X */ | |
580 } | 584 } |
581 | 585 |
582 static SDL_keysym *TranslateKey(int scancode, int modifiers, | 586 static SDL_keysym *TranslateKey(int scancode, int modifiers, |
583 SDL_keysym *keysym, int pressed) | 587 SDL_keysym *keysym, int pressed) |
584 { | 588 { |