Mercurial > sdl-ios-xcode
comparison src/events/SDL_keyboard.c @ 1670:eef792d31de8 SDL-1.3
Work in progress. :)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 07 Jun 2006 16:10:28 +0000 |
parents | 4da1ee79c9af |
children | 624e1412fbba |
comparison
equal
deleted
inserted
replaced
1669:9857d21967bb | 1670:eef792d31de8 |
---|---|
324 | 324 |
325 SDL_memset(&keysym, 0, (sizeof keysym)); | 325 SDL_memset(&keysym, 0, (sizeof keysym)); |
326 for (key = SDLK_FIRST; key < SDLK_LAST; ++key) { | 326 for (key = SDLK_FIRST; key < SDLK_LAST; ++key) { |
327 if (SDL_KeyState[key] == SDL_PRESSED) { | 327 if (SDL_KeyState[key] == SDL_PRESSED) { |
328 keysym.sym = key; | 328 keysym.sym = key; |
329 SDL_PrivateKeyboard(SDL_RELEASED, &keysym); | 329 SDL_SendKeyboard(SDL_RELEASED, &keysym); |
330 } | 330 } |
331 } | 331 } |
332 SDL_KeyRepeat.timestamp = 0; | 332 SDL_KeyRepeat.timestamp = 0; |
333 } | 333 } |
334 | 334 |
380 return (char *) (keyname); | 380 return (char *) (keyname); |
381 } | 381 } |
382 | 382 |
383 /* These are global for SDL_eventloop.c */ | 383 /* These are global for SDL_eventloop.c */ |
384 int | 384 int |
385 SDL_PrivateKeyboard(Uint8 state, SDL_keysym * keysym) | 385 SDL_SendKeyboard(Uint8 state, SDL_keysym * keysym) |
386 { | 386 { |
387 SDL_Event event; | 387 SDL_Event event; |
388 int posted, repeatable; | 388 int posted, repeatable; |
389 Uint16 modstate; | 389 Uint16 modstate; |
390 | 390 |