1 /* 2 Taken from https://github.com/depp/keycode, distributed with the following license: 3 4 Copyright 2011-2012 Dietrich Epp <depp@zdome.net> 5 All rights reserved. 6 7 Redistribution and use in source and binary forms, with or without 8 modification, are permitted provided that the following conditions are 9 met: 10 11 1. Redistributions of source code must retain the above copyright 12 notice, this list of conditions and the following disclaimer. 13 14 2. Redistributions in binary form must reproduce the above 15 copyright notice, this list of conditions and the following 16 disclaimer in the documentation and/or other materials provided 17 with the distribution. 18 19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32 /* This file is automatically generated by keycode.py. */ 33 #ifndef KEYCODE_KEYCODE_H 34 #define KEYCODE_KEYCODE_H 35 36 #include <stdint.h> 37 38 #include <retro_common_api.h> 39 40 #ifndef MAX_KEYS 41 #define MAX_KEYS 256 42 #endif 43 44 enum 45 { 46 KEY_A = 4, 47 KEY_B = 5, 48 KEY_C = 6, 49 KEY_D = 7, 50 KEY_E = 8, 51 KEY_F = 9, 52 KEY_G = 10, 53 KEY_H = 11, 54 KEY_I = 12, 55 KEY_J = 13, 56 KEY_K = 14, 57 KEY_L = 15, 58 KEY_M = 16, 59 KEY_N = 17, 60 KEY_O = 18, 61 KEY_P = 19, 62 KEY_Q = 20, 63 KEY_R = 21, 64 KEY_S = 22, 65 KEY_T = 23, 66 KEY_U = 24, 67 KEY_V = 25, 68 KEY_W = 26, 69 KEY_X = 27, 70 KEY_Y = 28, 71 KEY_Z = 29, 72 KEY_1 = 30, 73 KEY_2 = 31, 74 KEY_3 = 32, 75 KEY_4 = 33, 76 KEY_5 = 34, 77 KEY_6 = 35, 78 KEY_7 = 36, 79 KEY_8 = 37, 80 KEY_9 = 38, 81 KEY_0 = 39, 82 KEY_Enter = 40, 83 KEY_Escape = 41, 84 KEY_Delete = 42, 85 KEY_Tab = 43, 86 KEY_Space = 44, 87 KEY_Minus = 45, 88 KEY_Equals = 46, 89 KEY_LeftBracket = 47, 90 KEY_RightBracket = 48, 91 KEY_Backslash = 49, 92 KEY_Semicolon = 51, 93 KEY_Quote = 52, 94 KEY_Grave = 53, 95 KEY_Comma = 54, 96 KEY_Period = 55, 97 KEY_Slash = 56, 98 KEY_CapsLock = 57, 99 KEY_F1 = 58, 100 KEY_F2 = 59, 101 KEY_F3 = 60, 102 KEY_F4 = 61, 103 KEY_F5 = 62, 104 KEY_F6 = 63, 105 KEY_F7 = 64, 106 KEY_F8 = 65, 107 KEY_F9 = 66, 108 KEY_F10 = 67, 109 KEY_F11 = 68, 110 KEY_F12 = 69, 111 KEY_PrintScreen = 70, 112 KEY_ScrollLock = 71, 113 KEY_Pause = 72, 114 KEY_Insert = 73, 115 KEY_Home = 74, 116 KEY_PageUp = 75, 117 KEY_DeleteForward = 76, 118 KEY_End = 77, 119 KEY_PageDown = 78, 120 KEY_Right = 79, 121 KEY_Left = 80, 122 KEY_Down = 81, 123 KEY_Up = 82, 124 KP_NumLock = 83, 125 KP_Divide = 84, 126 KP_Multiply = 85, 127 KP_Subtract = 86, 128 KP_Add = 87, 129 KP_Enter = 88, 130 KP_1 = 89, 131 KP_2 = 90, 132 KP_3 = 91, 133 KP_4 = 92, 134 KP_5 = 93, 135 KP_6 = 94, 136 KP_7 = 95, 137 KP_8 = 96, 138 KP_9 = 97, 139 KP_0 = 98, 140 KP_Point = 99, 141 KEY_NonUSBackslash = 100, 142 KP_Equals = 103, 143 KEY_F13 = 104, 144 KEY_F14 = 105, 145 KEY_F15 = 106, 146 KEY_F16 = 107, 147 KEY_F17 = 108, 148 KEY_F18 = 109, 149 KEY_F19 = 110, 150 KEY_F20 = 111, 151 KEY_F21 = 112, 152 KEY_F22 = 113, 153 KEY_F23 = 114, 154 KEY_F24 = 115, 155 KEY_Help = 117, 156 KEY_Menu = 118, 157 KEY_LeftControl = 224, 158 KEY_LeftShift = 225, 159 KEY_LeftAlt = 226, 160 KEY_LeftGUI = 227, 161 KEY_RightControl = 228, 162 KEY_RightShift = 229, 163 KEY_RightAlt = 230, 164 KEY_RightGUI = 231 165 }; 166 167 RETRO_BEGIN_DECLS 168 169 void apple_input_keyboard_event(bool down, 170 unsigned code, uint32_t character, uint32_t mod, unsigned device); 171 172 RETRO_END_DECLS 173 174 #endif 175