1 // Copyright 2015 Dolphin Emulator Project 2 // Licensed under GPLv2+ 3 // Refer to the license.txt file included. 4 5 #pragma once 6 7 #include "Common/CommonTypes.h" 8 9 enum KeyMasks 10 { 11 KEYMASK_HOME = (1 << 0), 12 KEYMASK_END = (1 << 1), 13 KEYMASK_PGUP = (1 << 2), 14 KEYMASK_PGDN = (1 << 3), 15 KEYMASK_SCROLLLOCK = (1 << 4), 16 KEYMASK_A = (1 << 5), 17 KEYMASK_B = (1 << 6), 18 KEYMASK_C = (1 << 7), 19 KEYMASK_D = (1 << 8), 20 KEYMASK_E = (1 << 9), 21 KEYMASK_F = (1 << 10), 22 KEYMASK_G = (1 << 11), 23 KEYMASK_H = (1 << 12), 24 KEYMASK_I = (1 << 13), 25 KEYMASK_J = (1 << 14), 26 KEYMASK_K = (1 << 15), 27 KEYMASK_L = (1 << 0), 28 KEYMASK_M = (1 << 1), 29 KEYMASK_N = (1 << 2), 30 KEYMASK_O = (1 << 3), 31 KEYMASK_P = (1 << 4), 32 KEYMASK_Q = (1 << 5), 33 KEYMASK_R = (1 << 6), 34 KEYMASK_S = (1 << 7), 35 KEYMASK_T = (1 << 8), 36 KEYMASK_U = (1 << 9), 37 KEYMASK_V = (1 << 10), 38 KEYMASK_W = (1 << 11), 39 KEYMASK_X = (1 << 12), 40 KEYMASK_Y = (1 << 13), 41 KEYMASK_Z = (1 << 14), 42 KEYMASK_1 = (1 << 15), 43 KEYMASK_2 = (1 << 0), 44 KEYMASK_3 = (1 << 1), 45 KEYMASK_4 = (1 << 2), 46 KEYMASK_5 = (1 << 3), 47 KEYMASK_6 = (1 << 4), 48 KEYMASK_7 = (1 << 5), 49 KEYMASK_8 = (1 << 6), 50 KEYMASK_9 = (1 << 7), 51 KEYMASK_0 = (1 << 8), 52 KEYMASK_MINUS = (1 << 9), 53 KEYMASK_PLUS = (1 << 10), 54 KEYMASK_PRINTSCR = (1 << 11), 55 KEYMASK_BRACE_OPEN = (1 << 12), 56 KEYMASK_BRACE_CLOSE = (1 << 13), 57 KEYMASK_COLON = (1 << 14), 58 KEYMASK_QUOTE = (1 << 15), 59 KEYMASK_HASH = (1 << 0), 60 KEYMASK_COMMA = (1 << 1), 61 KEYMASK_PERIOD = (1 << 2), 62 KEYMASK_QUESTIONMARK = (1 << 3), 63 KEYMASK_INTERNATIONAL1 = (1 << 4), 64 KEYMASK_F1 = (1 << 5), 65 KEYMASK_F2 = (1 << 6), 66 KEYMASK_F3 = (1 << 7), 67 KEYMASK_F4 = (1 << 8), 68 KEYMASK_F5 = (1 << 9), 69 KEYMASK_F6 = (1 << 10), 70 KEYMASK_F7 = (1 << 11), 71 KEYMASK_F8 = (1 << 12), 72 KEYMASK_F9 = (1 << 13), 73 KEYMASK_F10 = (1 << 14), 74 KEYMASK_F11 = (1 << 15), 75 KEYMASK_F12 = (1 << 0), 76 KEYMASK_ESC = (1 << 1), 77 KEYMASK_INSERT = (1 << 2), 78 KEYMASK_DELETE = (1 << 3), 79 KEYMASK_TILDE = (1 << 4), 80 KEYMASK_BACKSPACE = (1 << 5), 81 KEYMASK_TAB = (1 << 6), 82 KEYMASK_CAPSLOCK = (1 << 7), 83 KEYMASK_LEFTSHIFT = (1 << 8), 84 KEYMASK_RIGHTSHIFT = (1 << 9), 85 KEYMASK_LEFTCONTROL = (1 << 10), 86 KEYMASK_RIGHTALT = (1 << 11), 87 KEYMASK_LEFTWINDOWS = (1 << 12), 88 KEYMASK_SPACE = (1 << 13), 89 KEYMASK_RIGHTWINDOWS = (1 << 14), 90 KEYMASK_MENU = (1 << 15), 91 KEYMASK_LEFTARROW = (1 << 0), 92 KEYMASK_DOWNARROW = (1 << 1), 93 KEYMASK_UPARROW = (1 << 2), 94 KEYMASK_RIGHTARROW = (1 << 3), 95 KEYMASK_ENTER = (1 << 4), 96 }; 97 98 enum KeyScanCode 99 { 100 KEY_HOME = 0x06, 101 KEY_END = 0x07, 102 KEY_PGUP = 0x08, 103 KEY_PGDN = 0x09, 104 KEY_SCROLLLOCK = 0x0A, 105 KEY_A = 0x10, 106 KEY_B = 0x11, 107 KEY_C = 0x12, 108 KEY_D = 0x13, 109 KEY_E = 0x14, 110 KEY_F = 0x15, 111 KEY_G = 0x16, 112 KEY_H = 0x17, 113 KEY_I = 0x18, 114 KEY_J = 0x19, 115 KEY_K = 0x1A, 116 KEY_L = 0x1B, 117 KEY_M = 0x1C, 118 KEY_N = 0x1D, 119 KEY_O = 0x1E, 120 KEY_P = 0x1F, 121 KEY_Q = 0x20, 122 KEY_R = 0x21, 123 KEY_S = 0x22, 124 KEY_T = 0x23, 125 KEY_U = 0x24, 126 KEY_V = 0x25, 127 KEY_W = 0x26, 128 KEY_X = 0x27, 129 KEY_Y = 0x28, 130 KEY_Z = 0x29, 131 KEY_1 = 0x2A, 132 KEY_2 = 0x2B, 133 KEY_3 = 0x2C, 134 KEY_4 = 0x2D, 135 KEY_5 = 0x2E, 136 KEY_6 = 0x2F, 137 KEY_7 = 0x30, 138 KEY_8 = 0x31, 139 KEY_9 = 0x32, 140 KEY_0 = 0x33, 141 KEY_MINUS = 0x34, 142 KEY_PLUS = 0x35, 143 KEY_PRINTSCR = 0x36, 144 KEY_BRACE_OPEN = 0x37, 145 KEY_BRACE_CLOSE = 0x38, 146 KEY_COLON = 0x39, 147 KEY_QUOTE = 0x3A, 148 KEY_HASH = 0x3B, 149 KEY_COMMA = 0x3C, 150 KEY_PERIOD = 0x3D, 151 KEY_QUESTIONMARK = 0x3E, 152 KEY_INTERNATIONAL1 = 0x3F, 153 KEY_F1 = 0x40, 154 KEY_F2 = 0x41, 155 KEY_F3 = 0x42, 156 KEY_F4 = 0x43, 157 KEY_F5 = 0x44, 158 KEY_F6 = 0x45, 159 KEY_F7 = 0x46, 160 KEY_F8 = 0x47, 161 KEY_F9 = 0x48, 162 KEY_F10 = 0x49, 163 KEY_F11 = 0x4A, 164 KEY_F12 = 0x4B, 165 KEY_ESC = 0x4C, 166 KEY_INSERT = 0x4D, 167 KEY_DELETE = 0x4E, 168 KEY_TILDE = 0x4F, 169 KEY_BACKSPACE = 0x50, 170 KEY_TAB = 0x51, 171 KEY_CAPSLOCK = 0x53, 172 KEY_LEFTSHIFT = 0x54, 173 KEY_RIGHTSHIFT = 0x55, 174 KEY_LEFTCONTROL = 0x56, 175 KEY_RIGHTALT = 0x57, 176 KEY_LEFTWINDOWS = 0x58, 177 KEY_SPACE = 0x59, 178 KEY_RIGHTWINDOWS = 0x5A, 179 KEY_MENU = 0x5B, 180 KEY_LEFTARROW = 0x5C, 181 KEY_DOWNARROW = 0x5D, 182 KEY_UPARROW = 0x5E, 183 KEY_RIGHTARROW = 0x5F, 184 KEY_ENTER = 0x61 185 186 }; 187 188 struct KeyboardStatus 189 { 190 u16 key0x; 191 u16 key1x; 192 u16 key2x; 193 u16 key3x; 194 u16 key4x; 195 u16 key5x; 196 u16 key6x; 197 s8 err; 198 }; 199