SDL_GetModState

Name

SDL_GetModState -- Get the state of modifier keys.

Synopsis

uses
SDL;

function SDL_GetModState : TSDLMod;

Description

Returns the current of the modifier keys (CTRL, ALT, etc.).

Return Value

The return value can be an OR'd combination of the SDLMod enum.

TSDLMod

TSDLMod = DWord;

const
KMOD_NONE = $0000;
KMOD_LSHIFT= $0001;
KMOD_RSHIFT= $0002;
KMOD_LCTRL = $0040;
KMOD_RCTRL = $0080;
KMOD_LALT = $0100;
KMOD_RALT = $0200;
KMOD_LMETA = $0400;
KMOD_RMETA = $0800;
KMOD_NUM = $1000;
KMOD_CAPS = $2000;
KMOD_MODE = $4000;
SDL also defines the following symbols for convenience:
const
KMOD_CTRL = ( KMOD_LCTRL or KMOD_RCTRL );
KMOD_SHIFT = ( KMOD_LSHIFT or KMOD_RSHIFT );
KMOD_ALT = ( KMOD_LALT or KMOD_RALT );
KMOD_META = ( KMOD_LMETA or KMOD_RMETA );

See Also

SDL_GetKeyState