include/SDL_keycode.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 25 Sep 2018 20:08:51 -0700
changeset 12224 0582b4e1fa9f
parent 11811 5d94cb6b24d3
child 12503 806492103856
permissions -rw-r--r--
Fixed bug 4268 - Android_JNI_OpenAudioDevice function has error

alittle

where iscapture == 1

1.param set error

(*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureOpen, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames)

param:audioBuffer16Bit need change to captureBuffer16Bit

2.logic error

if (is16Bit) {
// ALITTLE Modify the source code
if (iscapture) {
audioBufferFrames = (*env)->GetArrayLength(env, (jshortArray)captureBuffer);
} else {
audioBufferPinned = (*env)->GetShortArrayElements(env, (jshortArray)audioBuffer, &isCopy);
audioBufferFrames = (*env)->GetArrayLength(env, (jshortArray)audioBuffer);
}
// if (!iscapture) {
// audioBufferPinned = (*env)->GetShortArrayElements(env, (jshortArray)audioBuffer, &isCopy);
// }
// audioBufferFrames = (*env)->GetArrayLength(env, (jshortArray)audioBuffer);
} else {
// ALITTLE Modify the source code
if (iscapture) {
audioBufferFrames = (*env)->GetArrayLength(env, (jbyteArray)captureBuffer);
} else {
audioBufferPinned = (*env)->GetByteArrayElements(env, (jbyteArray)audioBuffer, &isCopy);
audioBufferFrames = (*env)->GetArrayLength(env, (jbyteArray)audioBuffer);
}
// if (!iscapture) {
// audioBufferPinned = (*env)->GetByteArrayElements(env, (jbyteArray)audioBuffer, &isCopy);
// }
// audioBufferFrames = (*env)->GetArrayLength(env, (jbyteArray)audioBuffer);
}
slouken@0
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@11811
     3
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
slouken@0
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@0
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@0
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@0
    20
*/
slouken@0
    21
slouken@1895
    22
/**
slouken@5326
    23
 *  \file SDL_keycode.h
slouken@7191
    24
 *
slouken@3407
    25
 *  Defines constants which identify keyboard keys and modifiers.
slouken@1895
    26
 */
slouken@1895
    27
slouken@10638
    28
#ifndef SDL_keycode_h_
slouken@10638
    29
#define SDL_keycode_h_
slouken@0
    30
slouken@2268
    31
#include "SDL_stdinc.h"
slouken@2303
    32
#include "SDL_scancode.h"
slouken@2268
    33
slouken@1895
    34
/**
slouken@3407
    35
 *  \brief The SDL virtual key representation.
slouken@7191
    36
 *
slouken@3407
    37
 *  Values of this type are used to represent keyboard keys using the current
slouken@3407
    38
 *  layout of the keyboard.  These values include Unicode values representing
slouken@3407
    39
 *  the unmodified character that would be generated by pressing the key, or
slouken@3407
    40
 *  an SDLK_* constant for those keys that do not generate characters.
slouken@11248
    41
 *
slouken@11248
    42
 *  A special exception is the number keys at the top of the keyboard which
slouken@11248
    43
 *  always map to SDLK_0...SDLK_9, regardless of layout.
slouken@0
    44
 */
slouken@5220
    45
typedef Sint32 SDL_Keycode;
slouken@2268
    46
slouken@2303
    47
#define SDLK_SCANCODE_MASK (1<<30)
slouken@7191
    48
#define SDL_SCANCODE_TO_KEYCODE(X)  (X | SDLK_SCANCODE_MASK)
slouken@2268
    49
slouken@2303
    50
enum
slouken@2303
    51
{
slouken@2303
    52
    SDLK_UNKNOWN = 0,
slouken@2268
    53
slouken@2989
    54
    SDLK_RETURN = '\r',
slouken@2989
    55
    SDLK_ESCAPE = '\033',
slouken@2989
    56
    SDLK_BACKSPACE = '\b',
slouken@2989
    57
    SDLK_TAB = '\t',
slouken@2989
    58
    SDLK_SPACE = ' ',
slouken@3574
    59
    SDLK_EXCLAIM = '!',
slouken@3574
    60
    SDLK_QUOTEDBL = '"',
slouken@3574
    61
    SDLK_HASH = '#',
slouken@3574
    62
    SDLK_PERCENT = '%',
slouken@3574
    63
    SDLK_DOLLAR = '$',
slouken@3574
    64
    SDLK_AMPERSAND = '&',
slouken@3574
    65
    SDLK_QUOTE = '\'',
slouken@3574
    66
    SDLK_LEFTPAREN = '(',
slouken@3574
    67
    SDLK_RIGHTPAREN = ')',
slouken@3574
    68
    SDLK_ASTERISK = '*',
slouken@3574
    69
    SDLK_PLUS = '+',
slouken@3574
    70
    SDLK_COMMA = ',',
slouken@3574
    71
    SDLK_MINUS = '-',
slouken@3574
    72
    SDLK_PERIOD = '.',
slouken@3574
    73
    SDLK_SLASH = '/',
slouken@3560
    74
    SDLK_0 = '0',
slouken@3560
    75
    SDLK_1 = '1',
slouken@3560
    76
    SDLK_2 = '2',
slouken@3560
    77
    SDLK_3 = '3',
slouken@3560
    78
    SDLK_4 = '4',
slouken@3560
    79
    SDLK_5 = '5',
slouken@3560
    80
    SDLK_6 = '6',
slouken@3560
    81
    SDLK_7 = '7',
slouken@3560
    82
    SDLK_8 = '8',
slouken@3560
    83
    SDLK_9 = '9',
slouken@3574
    84
    SDLK_COLON = ':',
slouken@3574
    85
    SDLK_SEMICOLON = ';',
slouken@3574
    86
    SDLK_LESS = '<',
slouken@3574
    87
    SDLK_EQUALS = '=',
slouken@3574
    88
    SDLK_GREATER = '>',
slouken@3574
    89
    SDLK_QUESTION = '?',
slouken@3574
    90
    SDLK_AT = '@',
slouken@7191
    91
    /*
slouken@3574
    92
       Skip uppercase letters
slouken@3574
    93
     */
slouken@3574
    94
    SDLK_LEFTBRACKET = '[',
slouken@3574
    95
    SDLK_BACKSLASH = '\\',
slouken@3574
    96
    SDLK_RIGHTBRACKET = ']',
slouken@3574
    97
    SDLK_CARET = '^',
slouken@3574
    98
    SDLK_UNDERSCORE = '_',
slouken@3574
    99
    SDLK_BACKQUOTE = '`',
slouken@3560
   100
    SDLK_a = 'a',
slouken@3560
   101
    SDLK_b = 'b',
slouken@3560
   102
    SDLK_c = 'c',
slouken@3560
   103
    SDLK_d = 'd',
slouken@3560
   104
    SDLK_e = 'e',
slouken@3560
   105
    SDLK_f = 'f',
slouken@3560
   106
    SDLK_g = 'g',
slouken@3560
   107
    SDLK_h = 'h',
slouken@3560
   108
    SDLK_i = 'i',
slouken@3560
   109
    SDLK_j = 'j',
slouken@3560
   110
    SDLK_k = 'k',
slouken@3560
   111
    SDLK_l = 'l',
slouken@3560
   112
    SDLK_m = 'm',
slouken@3560
   113
    SDLK_n = 'n',
slouken@3560
   114
    SDLK_o = 'o',
slouken@3560
   115
    SDLK_p = 'p',
slouken@3560
   116
    SDLK_q = 'q',
slouken@3560
   117
    SDLK_r = 'r',
slouken@3560
   118
    SDLK_s = 's',
slouken@3560
   119
    SDLK_t = 't',
slouken@3560
   120
    SDLK_u = 'u',
slouken@3560
   121
    SDLK_v = 'v',
slouken@3560
   122
    SDLK_w = 'w',
slouken@3560
   123
    SDLK_x = 'x',
slouken@3560
   124
    SDLK_y = 'y',
slouken@3560
   125
    SDLK_z = 'z',
slouken@3560
   126
slouken@2303
   127
    SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
slouken@0
   128
slouken@2303
   129
    SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
slouken@2303
   130
    SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),
slouken@2303
   131
    SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),
slouken@2303
   132
    SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),
slouken@2303
   133
    SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),
slouken@2303
   134
    SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),
slouken@2303
   135
    SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),
slouken@2303
   136
    SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),
slouken@2303
   137
    SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),
slouken@2303
   138
    SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),
slouken@2303
   139
    SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),
slouken@2303
   140
    SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),
slouken@0
   141
slouken@2303
   142
    SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),
slouken@2303
   143
    SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),
slouken@2303
   144
    SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),
slouken@2303
   145
    SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
slouken@2303
   146
    SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
slouken@2303
   147
    SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
slouken@2989
   148
    SDLK_DELETE = '\177',
slouken@2303
   149
    SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
slouken@2303
   150
    SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
slouken@2303
   151
    SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
slouken@2303
   152
    SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),
slouken@2303
   153
    SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),
slouken@2303
   154
    SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),
slouken@0
   155
slouken@2303
   156
    SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),
slouken@2303
   157
    SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),
slouken@2303
   158
    SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),
slouken@2303
   159
    SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),
slouken@2303
   160
    SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),
slouken@2303
   161
    SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),
slouken@2303
   162
    SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),
slouken@2303
   163
    SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),
slouken@2303
   164
    SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),
slouken@2303
   165
    SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),
slouken@2303
   166
    SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),
slouken@2303
   167
    SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),
slouken@2303
   168
    SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),
slouken@2303
   169
    SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),
slouken@2303
   170
    SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),
slouken@2303
   171
    SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),
slouken@2303
   172
    SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),
slouken@0
   173
slouken@2303
   174
    SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),
slouken@2303
   175
    SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),
slouken@2303
   176
    SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),
slouken@2303
   177
    SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),
slouken@2303
   178
    SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),
slouken@2303
   179
    SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),
slouken@2303
   180
    SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),
slouken@2303
   181
    SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),
slouken@2303
   182
    SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),
slouken@2303
   183
    SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),
slouken@2303
   184
    SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),
slouken@2303
   185
    SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),
slouken@2303
   186
    SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),
slouken@2303
   187
    SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),
slouken@2303
   188
    SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),
slouken@2303
   189
    SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),
slouken@2303
   190
    SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),
slouken@2303
   191
    SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),
slouken@2303
   192
    SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),
slouken@2303
   193
    SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),
slouken@2303
   194
    SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),
slouken@2303
   195
    SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),
slouken@2303
   196
    SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),
slouken@2303
   197
    SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),
slouken@2303
   198
    SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),
slouken@2303
   199
    SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),
slouken@2303
   200
    SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),
slouken@2303
   201
    SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),
slouken@2303
   202
    SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),
slouken@2303
   203
    SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),
slouken@2303
   204
    SDLK_KP_EQUALSAS400 =
slouken@2303
   205
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),
slouken@0
   206
slouken@2303
   207
    SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),
slouken@2303
   208
    SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),
slouken@2303
   209
    SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),
slouken@2303
   210
    SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),
slouken@2303
   211
    SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),
slouken@2303
   212
    SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),
slouken@2303
   213
    SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),
slouken@2303
   214
    SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),
slouken@2303
   215
    SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),
slouken@2303
   216
    SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),
slouken@2303
   217
    SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),
slouken@2303
   218
    SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),
slouken@2268
   219
slouken@2303
   220
    SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),
slouken@2303
   221
    SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),
slouken@2303
   222
    SDLK_THOUSANDSSEPARATOR =
slouken@2303
   223
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),
slouken@2303
   224
    SDLK_DECIMALSEPARATOR =
slouken@2303
   225
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),
slouken@2303
   226
    SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),
slouken@2303
   227
    SDLK_CURRENCYSUBUNIT =
slouken@2303
   228
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),
slouken@2303
   229
    SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),
slouken@2303
   230
    SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),
slouken@2303
   231
    SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),
slouken@2303
   232
    SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),
slouken@2303
   233
    SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),
slouken@2303
   234
    SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),
slouken@2303
   235
    SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),
slouken@2303
   236
    SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),
slouken@2303
   237
    SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),
slouken@2303
   238
    SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),
slouken@2303
   239
    SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),
slouken@2303
   240
    SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),
slouken@2303
   241
    SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),
slouken@2303
   242
    SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),
slouken@2303
   243
    SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),
slouken@2303
   244
    SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),
slouken@2303
   245
    SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),
slouken@2303
   246
    SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),
slouken@2303
   247
    SDLK_KP_DBLAMPERSAND =
slouken@2303
   248
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),
slouken@2303
   249
    SDLK_KP_VERTICALBAR =
slouken@2303
   250
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),
slouken@2303
   251
    SDLK_KP_DBLVERTICALBAR =
slouken@2303
   252
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),
slouken@2303
   253
    SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),
slouken@2303
   254
    SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),
slouken@2303
   255
    SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),
slouken@2303
   256
    SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),
slouken@2303
   257
    SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),
slouken@2303
   258
    SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),
slouken@2303
   259
    SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),
slouken@2303
   260
    SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),
slouken@2303
   261
    SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),
slouken@2303
   262
    SDLK_KP_MEMSUBTRACT =
slouken@2303
   263
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),
slouken@2303
   264
    SDLK_KP_MEMMULTIPLY =
slouken@2303
   265
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),
slouken@2303
   266
    SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),
slouken@2303
   267
    SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),
slouken@2303
   268
    SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),
slouken@2303
   269
    SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),
slouken@2303
   270
    SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),
slouken@2303
   271
    SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),
slouken@2303
   272
    SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),
slouken@2303
   273
    SDLK_KP_HEXADECIMAL =
slouken@2303
   274
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),
slouken@2268
   275
slouken@2303
   276
    SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),
slouken@2303
   277
    SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),
slouken@2303
   278
    SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),
slouken@2303
   279
    SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),
slouken@2303
   280
    SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),
slouken@2303
   281
    SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),
slouken@2303
   282
    SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),
slouken@2303
   283
    SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),
slouken@2268
   284
slouken@2303
   285
    SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),
slouken@2268
   286
slouken@2303
   287
    SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),
slouken@2303
   288
    SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),
slouken@2303
   289
    SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),
slouken@2303
   290
    SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),
slouken@2303
   291
    SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),
slouken@2303
   292
    SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),
slouken@2305
   293
    SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),
slouken@2303
   294
    SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),
slouken@2303
   295
    SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),
slouken@2303
   296
    SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),
slouken@2303
   297
    SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),
slouken@2303
   298
    SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),
slouken@2303
   299
    SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),
slouken@2303
   300
    SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),
slouken@2303
   301
    SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),
slouken@2303
   302
    SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),
slouken@2303
   303
    SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),
slouken@2268
   304
slouken@2303
   305
    SDLK_BRIGHTNESSDOWN =
slouken@2303
   306
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),
slouken@2303
   307
    SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),
slouken@2303
   308
    SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),
slouken@2303
   309
    SDLK_KBDILLUMTOGGLE =
slouken@2303
   310
        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),
slouken@2303
   311
    SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
slouken@2303
   312
    SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
slouken@2303
   313
    SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
slouken@11149
   314
    SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP),
slouken@11149
   315
    SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1),
slouken@11149
   316
    SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),
slouken@11149
   317
slouken@11149
   318
    SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
slouken@11149
   319
    SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
slouken@2268
   320
};
slouken@2268
   321
slouken@1895
   322
/**
slouken@3407
   323
 * \brief Enumeration of valid key mods (possibly OR'd together).
slouken@1895
   324
 */
slouken@1895
   325
typedef enum
slouken@1895
   326
{
slouken@1895
   327
    KMOD_NONE = 0x0000,
slouken@1895
   328
    KMOD_LSHIFT = 0x0001,
slouken@1895
   329
    KMOD_RSHIFT = 0x0002,
slouken@1895
   330
    KMOD_LCTRL = 0x0040,
slouken@1895
   331
    KMOD_RCTRL = 0x0080,
slouken@1895
   332
    KMOD_LALT = 0x0100,
slouken@1895
   333
    KMOD_RALT = 0x0200,
slouken@2303
   334
    KMOD_LGUI = 0x0400,
slouken@2303
   335
    KMOD_RGUI = 0x0800,
slouken@1895
   336
    KMOD_NUM = 0x1000,
slouken@1895
   337
    KMOD_CAPS = 0x2000,
slouken@1895
   338
    KMOD_MODE = 0x4000,
slouken@1895
   339
    KMOD_RESERVED = 0x8000
slouken@5220
   340
} SDL_Keymod;
slouken@0
   341
slouken@7191
   342
#define KMOD_CTRL   (KMOD_LCTRL|KMOD_RCTRL)
slouken@7191
   343
#define KMOD_SHIFT  (KMOD_LSHIFT|KMOD_RSHIFT)
slouken@7191
   344
#define KMOD_ALT    (KMOD_LALT|KMOD_RALT)
slouken@7191
   345
#define KMOD_GUI    (KMOD_LGUI|KMOD_RGUI)
slouken@0
   346
slouken@10638
   347
#endif /* SDL_keycode_h_ */
slouken@2303
   348
slouken@2303
   349
/* vi: set ts=4 sw=4 expandtab: */