include/SDL_scancode.h
changeset 7191 75360622e65f
parent 6937 6a0e4dc3a489
child 7677 871d43c6968a
     1.1 --- a/include/SDL_scancode.h	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/include/SDL_scancode.h	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -21,7 +21,7 @@
     1.4  
     1.5  /**
     1.6   *  \file SDL_scancode.h
     1.7 - *  
     1.8 + *
     1.9   *  Defines keyboard scancodes.
    1.10   */
    1.11  
    1.12 @@ -32,11 +32,11 @@
    1.13  
    1.14  /**
    1.15   *  \brief The SDL keyboard scancode representation.
    1.16 - *  
    1.17 + *
    1.18   *  Values of this type are used to represent keyboard keys, among other places
    1.19   *  in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the
    1.20   *  SDL_Event structure.
    1.21 - *  
    1.22 + *
    1.23   *  The values in this enumeration are based on the USB usage page standard:
    1.24   *  http://www.usb.org/developers/devclass_docs/Hut1_12v2.pdf
    1.25   */
    1.26 @@ -44,9 +44,9 @@
    1.27  {
    1.28      SDL_SCANCODE_UNKNOWN = 0,
    1.29  
    1.30 -    /** 
    1.31 +    /**
    1.32       *  \name Usage page 0x07
    1.33 -     *  
    1.34 +     *
    1.35       *  These values are from usage page 0x07 (USB keyboard page).
    1.36       */
    1.37      /*@{*/
    1.38 @@ -99,49 +99,49 @@
    1.39      SDL_SCANCODE_EQUALS = 46,
    1.40      SDL_SCANCODE_LEFTBRACKET = 47,
    1.41      SDL_SCANCODE_RIGHTBRACKET = 48,
    1.42 -    SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return 
    1.43 -                                  *   key on ISO keyboards and at the right end 
    1.44 -                                  *   of the QWERTY row on ANSI keyboards. 
    1.45 -                                  *   Produces REVERSE SOLIDUS (backslash) and 
    1.46 -                                  *   VERTICAL LINE in a US layout, REVERSE 
    1.47 -                                  *   SOLIDUS and VERTICAL LINE in a UK Mac 
    1.48 -                                  *   layout, NUMBER SIGN and TILDE in a UK 
    1.49 +    SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return
    1.50 +                                  *   key on ISO keyboards and at the right end
    1.51 +                                  *   of the QWERTY row on ANSI keyboards.
    1.52 +                                  *   Produces REVERSE SOLIDUS (backslash) and
    1.53 +                                  *   VERTICAL LINE in a US layout, REVERSE
    1.54 +                                  *   SOLIDUS and VERTICAL LINE in a UK Mac
    1.55 +                                  *   layout, NUMBER SIGN and TILDE in a UK
    1.56                                    *   Windows layout, DOLLAR SIGN and POUND SIGN
    1.57 -                                  *   in a Swiss German layout, NUMBER SIGN and 
    1.58 -                                  *   APOSTROPHE in a German layout, GRAVE 
    1.59 -                                  *   ACCENT and POUND SIGN in a French Mac 
    1.60 -                                  *   layout, and ASTERISK and MICRO SIGN in a 
    1.61 +                                  *   in a Swiss German layout, NUMBER SIGN and
    1.62 +                                  *   APOSTROPHE in a German layout, GRAVE
    1.63 +                                  *   ACCENT and POUND SIGN in a French Mac
    1.64 +                                  *   layout, and ASTERISK and MICRO SIGN in a
    1.65                                    *   French Windows layout.
    1.66                                    */
    1.67 -    SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code 
    1.68 -                                  *   instead of 49 for the same key, but all 
    1.69 -                                  *   OSes I've seen treat the two codes 
    1.70 +    SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code
    1.71 +                                  *   instead of 49 for the same key, but all
    1.72 +                                  *   OSes I've seen treat the two codes
    1.73                                    *   identically. So, as an implementor, unless
    1.74 -                                  *   your keyboard generates both of those 
    1.75 +                                  *   your keyboard generates both of those
    1.76                                    *   codes and your OS treats them differently,
    1.77                                    *   you should generate SDL_SCANCODE_BACKSLASH
    1.78 -                                  *   instead of this code. As a user, you 
    1.79 -                                  *   should not rely on this code because SDL 
    1.80 -                                  *   will never generate it with most (all?) 
    1.81 -                                  *   keyboards. 
    1.82 +                                  *   instead of this code. As a user, you
    1.83 +                                  *   should not rely on this code because SDL
    1.84 +                                  *   will never generate it with most (all?)
    1.85 +                                  *   keyboards.
    1.86                                    */
    1.87      SDL_SCANCODE_SEMICOLON = 51,
    1.88      SDL_SCANCODE_APOSTROPHE = 52,
    1.89 -    SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI 
    1.90 -                              *   and ISO keyboards). Produces GRAVE ACCENT and 
    1.91 -                              *   TILDE in a US Windows layout and in US and UK 
    1.92 -                              *   Mac layouts on ANSI keyboards, GRAVE ACCENT 
    1.93 -                              *   and NOT SIGN in a UK Windows layout, SECTION 
    1.94 -                              *   SIGN and PLUS-MINUS SIGN in US and UK Mac 
    1.95 -                              *   layouts on ISO keyboards, SECTION SIGN and 
    1.96 -                              *   DEGREE SIGN in a Swiss German layout (Mac: 
    1.97 -                              *   only on ISO keyboards), CIRCUMFLEX ACCENT and 
    1.98 -                              *   DEGREE SIGN in a German layout (Mac: only on 
    1.99 +    SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI
   1.100 +                              *   and ISO keyboards). Produces GRAVE ACCENT and
   1.101 +                              *   TILDE in a US Windows layout and in US and UK
   1.102 +                              *   Mac layouts on ANSI keyboards, GRAVE ACCENT
   1.103 +                              *   and NOT SIGN in a UK Windows layout, SECTION
   1.104 +                              *   SIGN and PLUS-MINUS SIGN in US and UK Mac
   1.105 +                              *   layouts on ISO keyboards, SECTION SIGN and
   1.106 +                              *   DEGREE SIGN in a Swiss German layout (Mac:
   1.107 +                              *   only on ISO keyboards), CIRCUMFLEX ACCENT and
   1.108 +                              *   DEGREE SIGN in a German layout (Mac: only on
   1.109                                *   ISO keyboards), SUPERSCRIPT TWO and TILDE in a
   1.110 -                              *   French Windows layout, COMMERCIAL AT and 
   1.111 -                              *   NUMBER SIGN in a French Mac layout on ISO 
   1.112 +                              *   French Windows layout, COMMERCIAL AT and
   1.113 +                              *   NUMBER SIGN in a French Mac layout on ISO
   1.114                                *   keyboards, and LESS-THAN SIGN and GREATER-THAN
   1.115 -                              *   SIGN in a Swiss German, German, or French Mac 
   1.116 +                              *   SIGN in a Swiss German, German, or French Mac
   1.117                                *   layout on ANSI keyboards.
   1.118                                */
   1.119      SDL_SCANCODE_COMMA = 54,
   1.120 @@ -178,7 +178,7 @@
   1.121      SDL_SCANCODE_DOWN = 81,
   1.122      SDL_SCANCODE_UP = 82,
   1.123  
   1.124 -    SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards 
   1.125 +    SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards
   1.126                                       */
   1.127      SDL_SCANCODE_KP_DIVIDE = 84,
   1.128      SDL_SCANCODE_KP_MULTIPLY = 85,
   1.129 @@ -197,19 +197,19 @@
   1.130      SDL_SCANCODE_KP_0 = 98,
   1.131      SDL_SCANCODE_KP_PERIOD = 99,
   1.132  
   1.133 -    SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO 
   1.134 -                                        *   keyboards have over ANSI ones, 
   1.135 -                                        *   located between left shift and Y. 
   1.136 +    SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO
   1.137 +                                        *   keyboards have over ANSI ones,
   1.138 +                                        *   located between left shift and Y.
   1.139                                          *   Produces GRAVE ACCENT and TILDE in a
   1.140                                          *   US or UK Mac layout, REVERSE SOLIDUS
   1.141 -                                        *   (backslash) and VERTICAL LINE in a 
   1.142 -                                        *   US or UK Windows layout, and 
   1.143 +                                        *   (backslash) and VERTICAL LINE in a
   1.144 +                                        *   US or UK Windows layout, and
   1.145                                          *   LESS-THAN SIGN and GREATER-THAN SIGN
   1.146                                          *   in a Swiss German, German, or French
   1.147                                          *   layout. */
   1.148      SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */
   1.149 -    SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag, 
   1.150 -                               *   not a physical key - but some Mac keyboards 
   1.151 +    SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,
   1.152 +                               *   not a physical key - but some Mac keyboards
   1.153                                 *   do have a power key. */
   1.154      SDL_SCANCODE_KP_EQUALS = 103,
   1.155      SDL_SCANCODE_F13 = 104,
   1.156 @@ -245,7 +245,7 @@
   1.157      SDL_SCANCODE_KP_COMMA = 133,
   1.158      SDL_SCANCODE_KP_EQUALSAS400 = 134,
   1.159  
   1.160 -    SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see 
   1.161 +    SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see
   1.162                                              footnotes in USB doc */
   1.163      SDL_SCANCODE_INTERNATIONAL2 = 136,
   1.164      SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */
   1.165 @@ -334,16 +334,16 @@
   1.166      SDL_SCANCODE_RALT = 230, /**< alt gr, option */
   1.167      SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */
   1.168  
   1.169 -    SDL_SCANCODE_MODE = 257,    /**< I'm not sure if this is really not covered 
   1.170 -                                 *   by any of the above, but since there's a 
   1.171 +    SDL_SCANCODE_MODE = 257,    /**< I'm not sure if this is really not covered
   1.172 +                                 *   by any of the above, but since there's a
   1.173                                   *   special KMOD_MODE for it I'm adding it here
   1.174                                   */
   1.175 -    
   1.176 +
   1.177      /*@}*//*Usage page 0x07*/
   1.178  
   1.179      /**
   1.180       *  \name Usage page 0x0C
   1.181 -     *  
   1.182 +     *
   1.183       *  These values are mapped from usage page 0x0C (USB consumer page).
   1.184       */
   1.185      /*@{*/
   1.186 @@ -365,34 +365,34 @@
   1.187      SDL_SCANCODE_AC_STOP = 272,
   1.188      SDL_SCANCODE_AC_REFRESH = 273,
   1.189      SDL_SCANCODE_AC_BOOKMARKS = 274,
   1.190 -    
   1.191 +
   1.192      /*@}*//*Usage page 0x0C*/
   1.193  
   1.194      /**
   1.195       *  \name Walther keys
   1.196 -     *  
   1.197 +     *
   1.198       *  These are values that Christian Walther added (for mac keyboard?).
   1.199       */
   1.200      /*@{*/
   1.201  
   1.202      SDL_SCANCODE_BRIGHTNESSDOWN = 275,
   1.203      SDL_SCANCODE_BRIGHTNESSUP = 276,
   1.204 -    SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display 
   1.205 +    SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display
   1.206                                             switch, video mode switch */
   1.207      SDL_SCANCODE_KBDILLUMTOGGLE = 278,
   1.208      SDL_SCANCODE_KBDILLUMDOWN = 279,
   1.209      SDL_SCANCODE_KBDILLUMUP = 280,
   1.210      SDL_SCANCODE_EJECT = 281,
   1.211      SDL_SCANCODE_SLEEP = 282,
   1.212 -    
   1.213 -	SDL_SCANCODE_APP1 = 283,
   1.214 -	SDL_SCANCODE_APP2 = 284,
   1.215 +
   1.216 +    SDL_SCANCODE_APP1 = 283,
   1.217 +    SDL_SCANCODE_APP2 = 284,
   1.218  
   1.219      /*@}*//*Walther keys*/
   1.220  
   1.221      /* Add any other keys here. */
   1.222  
   1.223 -    SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes 
   1.224 +    SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
   1.225                                   for array bounds */
   1.226  } SDL_Scancode;
   1.227