/Users/hercules/trunk/SDL-1.2/include/SDL_keyboard.h File Reference

#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)


Detailed Description

Include file for SDL keyboard event handling

Define Documentation

#define SDL_ALL_HOTKEYS   0xFFFFFFFF

This is the mask which refers to all hotkey bindings


Function Documentation

DECLSPEC int SDLCALL SDL_EnableKeyRepeat ( int  delay,
int  interval 
)

Enable/Disable keyboard repeat. Keyboard repeat defaults to off.

Parameters:
[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.
If 'delay' is set to 0, keyboard repeat is disabled.

DECLSPEC int SDLCALL SDL_EnableUNICODE ( int  enable  ) 

Enable/Disable UNICODE translation of keyboard input.

This translation has some overhead, so translation defaults off.

Parameters:
[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.
Returns:
It returns the previous state of keyboard translation.

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.


Generated on Mon Sep 21 21:29:50 2009 for Simple DirectMedia Layer by  doxygen 1.5.8