docs/man3/SDL_GetModState.3
author Sam Lantinga <slouken@libsdl.org>
Wed, 08 Mar 2006 18:30:12 +0000
changeset 1486 9d77fc9d0ace
parent 181 e5bc29de3f0a
child 2283 546f7c1eb755
permissions -rw-r--r--
Re-added C runtime support for Visual C++ 5,6
slouken@181
     1
.TH "SDL_GetModState" "3" "Tue 11 Sep 2001, 22:59" "SDL" "SDL API Reference" 
slouken@0
     2
.SH "NAME"
slouken@0
     3
SDL_GetModState\- Get the state of modifier keys\&.
slouken@0
     4
.SH "SYNOPSIS"
slouken@0
     5
.PP
slouken@0
     6
\fB#include "SDL\&.h"
slouken@0
     7
.sp
slouken@0
     8
\fBSDLMod \fBSDL_GetModState\fP\fR(\fBvoid\fR);
slouken@0
     9
.SH "DESCRIPTION"
slouken@0
    10
.PP
slouken@181
    11
Returns the current state of the modifier keys (CTRL, ALT, etc\&.)\&.
slouken@0
    12
.SH "RETURN VALUE"
slouken@0
    13
.PP
slouken@0
    14
The return value can be an OR\&'d combination of the SDLMod enum\&.
slouken@0
    15
.PP
slouken@0
    16
.PP
slouken@0
    17
.RS
slouken@0
    18
\fBSDLMod\fR
slouken@0
    19
.PP
slouken@0
    20
.PP
slouken@0
    21
.nf
slouken@0
    22
\f(CWtypedef enum {
slouken@0
    23
  KMOD_NONE  = 0x0000,
slouken@0
    24
  KMOD_LSHIFT= 0x0001,
slouken@0
    25
  KMOD_RSHIFT= 0x0002,
slouken@0
    26
  KMOD_LCTRL = 0x0040,
slouken@0
    27
  KMOD_RCTRL = 0x0080,
slouken@0
    28
  KMOD_LALT  = 0x0100,
slouken@0
    29
  KMOD_RALT  = 0x0200,
slouken@0
    30
  KMOD_LMETA = 0x0400,
slouken@0
    31
  KMOD_RMETA = 0x0800,
slouken@0
    32
  KMOD_NUM   = 0x1000,
slouken@0
    33
  KMOD_CAPS  = 0x2000,
slouken@0
    34
  KMOD_MODE  = 0x4000,
slouken@0
    35
} SDLMod;\fR
slouken@0
    36
.fi
slouken@0
    37
.PP
slouken@0
    38
.RE
slouken@0
    39
 SDL also defines the following symbols for convenience: 
slouken@0
    40
.PP
slouken@0
    41
.RS
slouken@0
    42
.PP
slouken@0
    43
.nf
slouken@0
    44
\f(CW#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL)
slouken@0
    45
#define KMOD_SHIFT  (KMOD_LSHIFT|KMOD_RSHIFT)
slouken@0
    46
#define KMOD_ALT  (KMOD_LALT|KMOD_RALT)
slouken@0
    47
#define KMOD_META (KMOD_LMETA|KMOD_RMETA)\fR
slouken@0
    48
.fi
slouken@0
    49
.PP
slouken@0
    50
.RE
slouken@0
    51
.SH "SEE ALSO"
slouken@0
    52
.PP
slouken@0
    53
\fI\fBSDL_GetKeyState\fP\fR
slouken@181
    54
...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 22:59