include/SDL_keysym.h
changeset 3407 d3baf5ac4e37
parent 2989 aba5a5cc2e63
child 3560 5543db4239e6
equal deleted inserted replaced
3406:8ae607392409 3407:d3baf5ac4e37
    19     Sam Lantinga
    19     Sam Lantinga
    20     slouken@libsdl.org
    20     slouken@libsdl.org
    21 */
    21 */
    22 
    22 
    23 /**
    23 /**
    24  * \file SDL_keysym.h
    24  *  \file SDL_keysym.h
       
    25  *  
       
    26  *  Defines constants which identify keyboard keys and modifiers.
    25  */
    27  */
    26 
    28 
    27 #ifndef _SDL_keysym_h
    29 #ifndef _SDL_keysym_h
    28 #define _SDL_keysym_h
    30 #define _SDL_keysym_h
    29 
    31 
    30 #include "SDL_stdinc.h"
    32 #include "SDL_stdinc.h"
    31 #include "SDL_scancode.h"
    33 #include "SDL_scancode.h"
    32 
    34 
    33 /**
    35 /**
    34  * \typedef SDLKey
    36  *  \brief The SDL virtual key representation.
    35  *
    37  *  
    36  * \brief The SDL virtual key representation.
    38  *  Values of this type are used to represent keyboard keys using the current
    37  *
    39  *  layout of the keyboard.  These values include Unicode values representing
    38  * Values of this type are used to represent keyboard keys using the current
    40  *  the unmodified character that would be generated by pressing the key, or
    39  * layout of the keyboard.  These values include Unicode values representing
    41  *  an SDLK_* constant for those keys that do not generate characters.
    40  * the unmodified character that would be generated by pressing the key, or
       
    41  * an SDLK_* constant for those keys that do not generate characters.
       
    42  */
    42  */
    43 typedef Sint32 SDLKey;
    43 typedef Sint32 SDLKey;
    44 
    44 
    45 #define SDLK_SCANCODE_MASK (1<<30)
    45 #define SDLK_SCANCODE_MASK (1<<30)
    46 #define SDL_SCANCODE_TO_KEYCODE(X)	(X | SDLK_SCANCODE_MASK)
    46 #define SDL_SCANCODE_TO_KEYCODE(X)	(X | SDLK_SCANCODE_MASK)
   244     SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
   244     SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
   245     SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
   245     SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
   246 };
   246 };
   247 
   247 
   248 /**
   248 /**
   249  * \enum SDLMod
   249  * \brief Enumeration of valid key mods (possibly OR'd together).
   250  *
       
   251  * \brief Enumeration of valid key mods (possibly OR'd together)
       
   252  */
   250  */
   253 typedef enum
   251 typedef enum
   254 {
   252 {
   255     KMOD_NONE = 0x0000,
   253     KMOD_NONE = 0x0000,
   256     KMOD_LSHIFT = 0x0001,
   254     KMOD_LSHIFT = 0x0001,