#include "SDL_stdinc.h"#include "SDL_error.h"#include "SDL_keysym.h"#include "begin_code.h"#include "close_code.h"Go to the source code of this file.
Data Structures | |
| struct | SDL_keysym |
Defines | |
| #define | SDL_ALL_HOTKEYS 0xFFFFFFFF |
| #define | SDL_DEFAULT_REPEAT_DELAY 500 |
| #define | SDL_DEFAULT_REPEAT_INTERVAL 30 |
Functions | |
| DECLSPEC int SDLCALL | SDL_EnableUNICODE (int enable) |
| DECLSPEC int SDLCALL | SDL_EnableKeyRepeat (int delay, int interval) |
| DECLSPEC void SDLCALL | SDL_GetKeyRepeat (int *delay, int *interval) |
| DECLSPEC Uint8 *SDLCALL | SDL_GetKeyState (int *numkeys) |
| DECLSPEC SDLMod SDLCALL | SDL_GetModState (void) |
| DECLSPEC void SDLCALL | SDL_SetModState (SDLMod modstate) |
| DECLSPEC char *SDLCALL | SDL_GetKeyName (SDLKey key) |
| #define SDL_ALL_HOTKEYS 0xFFFFFFFF |
This is the mask which refers to all hotkey bindings
| DECLSPEC int SDLCALL SDL_EnableKeyRepeat | ( | int | delay, | |
| int | interval | |||
| ) |
Enable/Disable keyboard repeat. Keyboard repeat defaults to off.
| [in] | delay | 'delay' is the initial delay in ms between the time when a key is pressed, and keyboard repeat begins. |
| [in] | interval | 'interval' is the time in ms between keyboard repeat events. |
| DECLSPEC int SDLCALL SDL_EnableUNICODE | ( | int | enable | ) |
Enable/Disable UNICODE translation of keyboard input.
This translation has some overhead, so translation defaults off.
| [in] | enable | If 'enable' is 1, translation is enabled. If 'enable' is 0, translation is disabled. If 'enable' is -1, the translation state is not changed. |
| DECLSPEC char* SDLCALL SDL_GetKeyName | ( | SDLKey | key | ) |
Get the name of an SDL virtual keysym
| DECLSPEC Uint8* SDLCALL SDL_GetKeyState | ( | int * | numkeys | ) |
Get a snapshot of the current state of the keyboard. Returns an array of keystates, indexed by the SDLK_* syms. Usage:
Uint8 *keystate = SDL_GetKeyState(NULL); if ( keystate[SDLK_RETURN] ) //... <RETURN> is pressed.
| DECLSPEC SDLMod SDLCALL SDL_GetModState | ( | void | ) |
Get the current key modifier state
| DECLSPEC void SDLCALL SDL_SetModState | ( | SDLMod | modstate | ) |
Set the current key modifier state. This does not change the keyboard state, only the key modifier flags.
1.5.8