1SDL_GetModState(3)             SDL API Reference            SDL_GetModState(3)
2
3
4

NAME

6       SDL_GetModState - Get the state of modifier keys.
7

SYNOPSIS

9       #include "SDL.h"
10
11       SDLMod SDL_GetModState(void);
12

DESCRIPTION

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

RETURN VALUE

17       The return value can be an OR'd combination of the SDLMod enum.
18
19              SDLMod
20
21              typedef enum {
22                KMOD_NONE  = 0x0000,
23                KMOD_LSHIFT= 0x0001,
24                KMOD_RSHIFT= 0x0002,
25                KMOD_LCTRL = 0x0040,
26                KMOD_RCTRL = 0x0080,
27                KMOD_LALT  = 0x0100,
28                KMOD_RALT  = 0x0200,
29                KMOD_LMETA = 0x0400,
30                KMOD_RMETA = 0x0800,
31                KMOD_NUM   = 0x1000,
32                KMOD_CAPS  = 0x2000,
33                KMOD_MODE  = 0x4000,
34              } SDLMod;
35
36        SDL also defines the following symbols for convenience:
37
38              #define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL)
39              #define KMOD_SHIFT  (KMOD_LSHIFT|KMOD_RSHIFT)
40              #define KMOD_ALT  (KMOD_LALT|KMOD_RALT)
41              #define KMOD_META (KMOD_LMETA|KMOD_RMETA)
42

SEE ALSO

44       SDL_GetKeyState
45
46
47
48SDL                         Tue 11 Sep 2001, 22:59          SDL_GetModState(3)
Impressum