1 /*! 2 @file 3 @author Albert Semenov 4 @date 01/2009 5 @module 6 */ 7 #pragma once 8 9 #include <MyGUI.h> 10 #include "Marshaling.h" 11 12 namespace MyGUI 13 { 14 namespace Managed 15 { 16 17 #ifndef MMYGUI_USING_EXTERNAL_TYPE 18 19 public enum struct KeyCode 20 { 21 None = 0x00, 22 Escape = 0x01, 23 One = 0x02, 24 Two = 0x03, 25 Three = 0x04, 26 Four = 0x05, 27 Five = 0x06, 28 Six = 0x07, 29 Seven = 0x08, 30 Eight = 0x09, 31 Nine = 0x0A, 32 Zero = 0x0B, 33 Minus = 0x0C, /* - on main keyboard */ 34 Equals = 0x0D, 35 Backspace = 0x0E, /* Backspace */ 36 Tab = 0x0F, 37 Q = 0x10, 38 W = 0x11, 39 E = 0x12, 40 R = 0x13, 41 T = 0x14, 42 Y = 0x15, 43 U = 0x16, 44 I = 0x17, 45 O = 0x18, 46 P = 0x19, 47 LeftBracket = 0x1A, 48 RightBracket = 0x1B, 49 Return = 0x1C, /* Enter on main keyboard */ 50 LeftControl = 0x1D, 51 A = 0x1E, 52 S = 0x1F, 53 D = 0x20, 54 F = 0x21, 55 G = 0x22, 56 H = 0x23, 57 J = 0x24, 58 K = 0x25, 59 L = 0x26, 60 Semicolon = 0x27, 61 Apostrophe = 0x28, 62 Grave = 0x29, /* Accent grave ( ~ ) */ 63 LeftShift = 0x2A, 64 Backslash = 0x2B, 65 Z = 0x2C, 66 X = 0x2D, 67 C = 0x2E, 68 V = 0x2F, 69 B = 0x30, 70 N = 0x31, 71 M = 0x32, 72 Comma = 0x33, 73 Period = 0x34, /* . on main keyboard */ 74 Slash = 0x35, /* '/' on main keyboard */ 75 RightShift = 0x36, 76 Multiply = 0x37, /* * on numeric keypad */ 77 LeftAlt = 0x38, /* Left Alt */ 78 Space = 0x39, 79 Capital = 0x3A, 80 F1 = 0x3B, 81 F2 = 0x3C, 82 F3 = 0x3D, 83 F4 = 0x3E, 84 F5 = 0x3F, 85 F6 = 0x40, 86 F7 = 0x41, 87 F8 = 0x42, 88 F9 = 0x43, 89 F10 = 0x44, 90 NumLock = 0x45, 91 ScrollLock = 0x46, /* Scroll Lock */ 92 Numpad7 = 0x47, 93 Numpad8 = 0x48, 94 Numpad9 = 0x49, 95 Subtract = 0x4A, /* - on numeric keypad */ 96 Numpad4 = 0x4B, 97 Numpad5 = 0x4C, 98 Numpad6 = 0x4D, 99 Add = 0x4E, /* + on numeric keypad */ 100 Numpad1 = 0x4F, 101 Numpad2 = 0x50, 102 Numpad3 = 0x51, 103 Numpad0 = 0x52, 104 Decimal = 0x53, /* . on numeric keypad */ 105 OEM_102 = 0x56, /* < > | on UK/Germany keyboards */ 106 F11 = 0x57, 107 F12 = 0x58, 108 F13 = 0x64, /* (NEC PC98) */ 109 F14 = 0x65, /* (NEC PC98) */ 110 F15 = 0x66, /* (NEC PC98) */ 111 Kana = 0x70, /* (Japanese keyboard) */ 112 ABNT_C1 = 0x73, /* / ? on Portugese (Brazilian) keyboards */ 113 YesConvert = 0x79, /* (Japanese keyboard) */ 114 NoConvert = 0x7B, /* (Japanese keyboard) */ 115 Yen = 0x7D, /* (Japanese keyboard) */ 116 ABNT_C2 = 0x7E, /* Numpad . on Portugese (Brazilian) keyboards */ 117 NumpadEquals = 0x8D, /* = on numeric keypad (NEC PC98) */ 118 PrevTrack = 0x90, /* Previous Track (KC_CIRCUMFLEX on Japanese keyboard) */ 119 At = 0x91, /* (NEC PC98) */ 120 Colon = 0x92, /* (NEC PC98) */ 121 Underline = 0x93, /* (NEC PC98) */ 122 Kanji = 0x94, /* (Japanese keyboard) */ 123 Stop = 0x95, /* (NEC PC98) */ 124 AX = 0x96, /* (Japan AX) */ 125 Unlabeled = 0x97, /* (J3100) */ 126 NextTrack = 0x99, /* Next Track */ 127 NumpadEnter = 0x9C, /* Enter on numeric keypad */ 128 RightControl = 0x9D, 129 Mute = 0xA0, 130 Calculator = 0xA1, 131 PlayPause = 0xA2, /* Play / Pause */ 132 MediaStop = 0xA4, /* Media Stop */ 133 VolumeDown = 0xAE, /* Volume - */ 134 VolumeUp = 0xB0, /* Volume + */ 135 WebHome = 0xB2, /* Web home */ 136 NumpadComma = 0xB3, /* , on numeric keypad (NEC PC98) */ 137 Divide = 0xB5, /* / on numeric keypad */ 138 SysRq = 0xB7, 139 RightAlt = 0xB8, /* Right Alt */ 140 Pause = 0xC5, 141 Home = 0xC7, /* Home on arrow keypad */ 142 ArrowUp = 0xC8, /* UpArrow on arrow keypad */ 143 PageUp = 0xC9, /* PgUp on arrow keypad */ 144 ArrowLeft = 0xCB, /* LeftArrow on arrow keypad */ 145 ArrowRight = 0xCD, /* RightArrow on arrow keypad */ 146 End = 0xCF, /* End on arrow keypad */ 147 ArrowDown = 0xD0, /* DownArrow on arrow keypad */ 148 PageDown = 0xD1, /* PgDn on arrow keypad */ 149 Insert = 0xD2, /* Insert on arrow keypad */ 150 Delete = 0xD3, /* Delete on arrow keypad */ 151 LeftWindows = 0xDB, /* Left Windows key */ 152 RightWindow = 0xDC, /* Right Windows key */ 153 RightWindows = 0xDC, /* Right Windows key - Correct spelling :) */ 154 AppMenu = 0xDD, /* AppMenu key */ 155 Power = 0xDE, /* System Power */ 156 Sleep = 0xDF, /* System Sleep */ 157 Wake = 0xE3, /* System Wake */ 158 WebSearch = 0xE5, 159 WebFavorites = 0xE6, 160 WebRefresh = 0xE7, 161 WebStop = 0xE8, 162 WebForward = 0xE9, 163 WebBack = 0xEA, 164 MyComputer = 0xEB, 165 Mail = 0xEC, 166 MediaSelect = 0xED 167 }; 168 169 #else 170 171 typedef MMYGUI_EXTERNAL_NAMESPACE KeyCode KeyCode; 172 173 #endif // MMYGUI_USING_EXTERNAL_TYPE 174 175 template <> struct Convert<MyGUI::KeyCode> 176 { 177 typedef KeyCode Type; 178 inline static const KeyCode& To(const MyGUI::KeyCode& _value) 179 { 180 return reinterpret_cast<const KeyCode&>(_value); 181 } 182 inline static MyGUI::KeyCode& From(KeyCode& _value) 183 { 184 return reinterpret_cast<MyGUI::KeyCode&>(_value); 185 } 186 }; 187 188 } // namespace Managed 189 } // namespace MyGUI 190