src/video/quartz/SDL_QuartzEvents.m
branchSDL-1.2
changeset 3914 4fd12011d8d6
parent 1876 406b8325ee34
child 3922 4e02435ad2be
equal deleted inserted replaced
3913:9e454eb693a5 3914:4fd12011d8d6
    85     keymap[QZ_F8] = SDLK_F8;
    85     keymap[QZ_F8] = SDLK_F8;
    86     keymap[QZ_F9] = SDLK_F9;
    86     keymap[QZ_F9] = SDLK_F9;
    87     keymap[QZ_F10] = SDLK_F10;
    87     keymap[QZ_F10] = SDLK_F10;
    88     keymap[QZ_F11] = SDLK_F11;
    88     keymap[QZ_F11] = SDLK_F11;
    89     keymap[QZ_F12] = SDLK_F12;
    89     keymap[QZ_F12] = SDLK_F12;
       
    90     keymap[QZ_F13] = SDLK_F13;
       
    91     keymap[QZ_F14] = SDLK_F14;
       
    92     keymap[QZ_F15] = SDLK_F15;
       
    93 /*
    90     keymap[QZ_PRINT] = SDLK_PRINT;
    94     keymap[QZ_PRINT] = SDLK_PRINT;
    91     keymap[QZ_SCROLLOCK] = SDLK_SCROLLOCK;
    95     keymap[QZ_SCROLLOCK] = SDLK_SCROLLOCK;
    92     keymap[QZ_PAUSE] = SDLK_PAUSE;
    96     keymap[QZ_PAUSE] = SDLK_PAUSE;
       
    97 */
    93     keymap[QZ_POWER] = SDLK_POWER;
    98     keymap[QZ_POWER] = SDLK_POWER;
    94     keymap[QZ_BACKQUOTE] = SDLK_BACKQUOTE;
    99     keymap[QZ_BACKQUOTE] = SDLK_BACKQUOTE;
    95     keymap[QZ_1] = SDLK_1;
   100     keymap[QZ_1] = SDLK_1;
    96     keymap[QZ_2] = SDLK_2;
   101     keymap[QZ_2] = SDLK_2;
    97     keymap[QZ_3] = SDLK_3;
   102     keymap[QZ_3] = SDLK_3;
   268     }
   273     }
   269 
   274 
   270     if (numChars == 0) {
   275     if (numChars == 0) {
   271       
   276       
   272         key.scancode = [ event keyCode ];
   277         key.scancode = [ event keyCode ];
       
   278 printf("numChars == 0, scancode == %d\n", (int) key.scancode);
   273         key.sym      = keymap [ key.scancode ];
   279         key.sym      = keymap [ key.scancode ];
   274         key.unicode  = 0;
   280         key.unicode  = 0;
   275         key.mod      = KMOD_NONE;
   281         key.mod      = KMOD_NONE;
   276 
   282 
   277         SDL_PrivateKeyboard (state, &key);
   283         SDL_PrivateKeyboard (state, &key);
   278     }
   284     }
   279     else if (numChars == 1) {
   285     else if (numChars == 1) {
   280 
   286 
   281         key.scancode = [ event keyCode ];
   287         key.scancode = [ event keyCode ];
       
   288 printf("numChars == 1, scancode == %d\n", (int) key.scancode);
   282         key.sym      = keymap [ key.scancode ];
   289         key.sym      = keymap [ key.scancode ];
   283         key.unicode  = [ chars characterAtIndex:0 ];
   290         key.unicode  = [ chars characterAtIndex:0 ];
   284         key.mod      = KMOD_NONE;
   291         key.mod      = KMOD_NONE;
   285 
   292 
   286         SDL_PrivateKeyboard (state, &key);
   293         SDL_PrivateKeyboard (state, &key);