1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 5 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 // IWYU pragma: private, include "mozilla/KeyTextEvents.h" 7 8 /** 9 * This header file defines all DOM keys which are defined in KeyboardEvent. 10 * You must define NS_DEFINE_VK macro before including this. 11 * 12 * It must have two arguments, (aDOMKeyName, aDOMKeyCode) 13 * aDOMKeyName is a key name in DOM. 14 * aDOMKeyCode is one of mozilla::dom::KeyboardEvent_Binding::DOM_VK_*. 15 * 16 * Optionally, you can define NS_DISALLOW_SAME_KEYCODE. 17 * 18 * If NS_DISALLOW_SAME_KEYCODE is defined, same keyCode won't listed up. 19 * This is useful when you create switch-case statement. 20 */ 21 22 #define DEFINE_VK_INTERNAL(aKeyName) \ 23 NS_DEFINE_VK(VK##aKeyName, \ 24 mozilla::dom::KeyboardEvent_Binding::DOM_VK##aKeyName) 25 26 // Some keycode may have different name in KeyboardEvent from its key name. 27 #define DEFINE_VK_INTERNAL2(aKeyName, aKeyCodeName) \ 28 NS_DEFINE_VK(VK##aKeyName, \ 29 mozilla::dom::KeyboardEvent_Binding::DOM_VK##aKeyCodeName) 30 31 DEFINE_VK_INTERNAL(_CANCEL) 32 DEFINE_VK_INTERNAL(_HELP) 33 DEFINE_VK_INTERNAL2(_BACK, _BACK_SPACE) 34 DEFINE_VK_INTERNAL(_TAB) 35 DEFINE_VK_INTERNAL(_CLEAR) 36 DEFINE_VK_INTERNAL(_RETURN) 37 DEFINE_VK_INTERNAL(_SHIFT) 38 DEFINE_VK_INTERNAL(_CONTROL) 39 DEFINE_VK_INTERNAL(_ALT) 40 DEFINE_VK_INTERNAL(_PAUSE) 41 DEFINE_VK_INTERNAL(_CAPS_LOCK) 42 #ifdef NS_DISALLOW_SAME_KEYCODE 43 DEFINE_VK_INTERNAL2(_KANA_OR_HANGUL, _KANA) 44 #else // #ifdef NS_DISALLOW_SAME_KEYCODE 45 DEFINE_VK_INTERNAL(_KANA) 46 DEFINE_VK_INTERNAL(_HANGUL) 47 #endif 48 DEFINE_VK_INTERNAL(_EISU) 49 DEFINE_VK_INTERNAL(_JUNJA) 50 DEFINE_VK_INTERNAL(_FINAL) 51 #ifdef NS_DISALLOW_SAME_KEYCODE 52 DEFINE_VK_INTERNAL2(_HANJA_OR_KANJI, _HANJA) 53 #else // #ifdef NS_DISALLOW_SAME_KEYCODE 54 DEFINE_VK_INTERNAL(_HANJA) 55 DEFINE_VK_INTERNAL(_KANJI) 56 #endif 57 DEFINE_VK_INTERNAL(_ESCAPE) 58 DEFINE_VK_INTERNAL(_CONVERT) 59 DEFINE_VK_INTERNAL(_NONCONVERT) 60 DEFINE_VK_INTERNAL(_ACCEPT) 61 DEFINE_VK_INTERNAL(_MODECHANGE) 62 DEFINE_VK_INTERNAL(_SPACE) 63 DEFINE_VK_INTERNAL(_PAGE_UP) 64 DEFINE_VK_INTERNAL(_PAGE_DOWN) 65 DEFINE_VK_INTERNAL(_END) 66 DEFINE_VK_INTERNAL(_HOME) 67 DEFINE_VK_INTERNAL(_LEFT) 68 DEFINE_VK_INTERNAL(_UP) 69 DEFINE_VK_INTERNAL(_RIGHT) 70 DEFINE_VK_INTERNAL(_DOWN) 71 DEFINE_VK_INTERNAL(_SELECT) 72 DEFINE_VK_INTERNAL(_PRINT) 73 DEFINE_VK_INTERNAL(_EXECUTE) 74 DEFINE_VK_INTERNAL(_PRINTSCREEN) 75 DEFINE_VK_INTERNAL(_INSERT) 76 DEFINE_VK_INTERNAL(_DELETE) 77 78 DEFINE_VK_INTERNAL(_0) 79 DEFINE_VK_INTERNAL(_1) 80 DEFINE_VK_INTERNAL(_2) 81 DEFINE_VK_INTERNAL(_3) 82 DEFINE_VK_INTERNAL(_4) 83 DEFINE_VK_INTERNAL(_5) 84 DEFINE_VK_INTERNAL(_6) 85 DEFINE_VK_INTERNAL(_7) 86 DEFINE_VK_INTERNAL(_8) 87 DEFINE_VK_INTERNAL(_9) 88 89 DEFINE_VK_INTERNAL(_COLON) 90 DEFINE_VK_INTERNAL(_SEMICOLON) 91 DEFINE_VK_INTERNAL(_LESS_THAN) 92 DEFINE_VK_INTERNAL(_EQUALS) 93 DEFINE_VK_INTERNAL(_GREATER_THAN) 94 DEFINE_VK_INTERNAL(_QUESTION_MARK) 95 DEFINE_VK_INTERNAL(_AT) 96 97 DEFINE_VK_INTERNAL(_A) 98 DEFINE_VK_INTERNAL(_B) 99 DEFINE_VK_INTERNAL(_C) 100 DEFINE_VK_INTERNAL(_D) 101 DEFINE_VK_INTERNAL(_E) 102 DEFINE_VK_INTERNAL(_F) 103 DEFINE_VK_INTERNAL(_G) 104 DEFINE_VK_INTERNAL(_H) 105 DEFINE_VK_INTERNAL(_I) 106 DEFINE_VK_INTERNAL(_J) 107 DEFINE_VK_INTERNAL(_K) 108 DEFINE_VK_INTERNAL(_L) 109 DEFINE_VK_INTERNAL(_M) 110 DEFINE_VK_INTERNAL(_N) 111 DEFINE_VK_INTERNAL(_O) 112 DEFINE_VK_INTERNAL(_P) 113 DEFINE_VK_INTERNAL(_Q) 114 DEFINE_VK_INTERNAL(_R) 115 DEFINE_VK_INTERNAL(_S) 116 DEFINE_VK_INTERNAL(_T) 117 DEFINE_VK_INTERNAL(_U) 118 DEFINE_VK_INTERNAL(_V) 119 DEFINE_VK_INTERNAL(_W) 120 DEFINE_VK_INTERNAL(_X) 121 DEFINE_VK_INTERNAL(_Y) 122 DEFINE_VK_INTERNAL(_Z) 123 124 DEFINE_VK_INTERNAL(_WIN) 125 DEFINE_VK_INTERNAL(_CONTEXT_MENU) 126 DEFINE_VK_INTERNAL(_SLEEP) 127 128 DEFINE_VK_INTERNAL(_NUMPAD0) 129 DEFINE_VK_INTERNAL(_NUMPAD1) 130 DEFINE_VK_INTERNAL(_NUMPAD2) 131 DEFINE_VK_INTERNAL(_NUMPAD3) 132 DEFINE_VK_INTERNAL(_NUMPAD4) 133 DEFINE_VK_INTERNAL(_NUMPAD5) 134 DEFINE_VK_INTERNAL(_NUMPAD6) 135 DEFINE_VK_INTERNAL(_NUMPAD7) 136 DEFINE_VK_INTERNAL(_NUMPAD8) 137 DEFINE_VK_INTERNAL(_NUMPAD9) 138 DEFINE_VK_INTERNAL(_MULTIPLY) 139 DEFINE_VK_INTERNAL(_ADD) 140 DEFINE_VK_INTERNAL(_SEPARATOR) 141 DEFINE_VK_INTERNAL(_SUBTRACT) 142 DEFINE_VK_INTERNAL(_DECIMAL) 143 DEFINE_VK_INTERNAL(_DIVIDE) 144 145 DEFINE_VK_INTERNAL(_F1) 146 DEFINE_VK_INTERNAL(_F2) 147 DEFINE_VK_INTERNAL(_F3) 148 DEFINE_VK_INTERNAL(_F4) 149 DEFINE_VK_INTERNAL(_F5) 150 DEFINE_VK_INTERNAL(_F6) 151 DEFINE_VK_INTERNAL(_F7) 152 DEFINE_VK_INTERNAL(_F8) 153 DEFINE_VK_INTERNAL(_F9) 154 DEFINE_VK_INTERNAL(_F10) 155 DEFINE_VK_INTERNAL(_F11) 156 DEFINE_VK_INTERNAL(_F12) 157 DEFINE_VK_INTERNAL(_F13) 158 DEFINE_VK_INTERNAL(_F14) 159 DEFINE_VK_INTERNAL(_F15) 160 DEFINE_VK_INTERNAL(_F16) 161 DEFINE_VK_INTERNAL(_F17) 162 DEFINE_VK_INTERNAL(_F18) 163 DEFINE_VK_INTERNAL(_F19) 164 DEFINE_VK_INTERNAL(_F20) 165 DEFINE_VK_INTERNAL(_F21) 166 DEFINE_VK_INTERNAL(_F22) 167 DEFINE_VK_INTERNAL(_F23) 168 DEFINE_VK_INTERNAL(_F24) 169 170 DEFINE_VK_INTERNAL(_NUM_LOCK) 171 DEFINE_VK_INTERNAL(_SCROLL_LOCK) 172 173 DEFINE_VK_INTERNAL(_WIN_OEM_FJ_JISHO) 174 DEFINE_VK_INTERNAL(_WIN_OEM_FJ_MASSHOU) 175 DEFINE_VK_INTERNAL(_WIN_OEM_FJ_TOUROKU) 176 DEFINE_VK_INTERNAL(_WIN_OEM_FJ_LOYA) 177 DEFINE_VK_INTERNAL(_WIN_OEM_FJ_ROYA) 178 179 DEFINE_VK_INTERNAL(_CIRCUMFLEX) 180 DEFINE_VK_INTERNAL(_EXCLAMATION) 181 DEFINE_VK_INTERNAL(_DOUBLE_QUOTE) 182 DEFINE_VK_INTERNAL(_HASH) 183 DEFINE_VK_INTERNAL(_DOLLAR) 184 DEFINE_VK_INTERNAL(_PERCENT) 185 DEFINE_VK_INTERNAL(_AMPERSAND) 186 DEFINE_VK_INTERNAL(_UNDERSCORE) 187 DEFINE_VK_INTERNAL(_OPEN_PAREN) 188 DEFINE_VK_INTERNAL(_CLOSE_PAREN) 189 DEFINE_VK_INTERNAL(_ASTERISK) 190 DEFINE_VK_INTERNAL(_PLUS) 191 DEFINE_VK_INTERNAL(_PIPE) 192 DEFINE_VK_INTERNAL(_HYPHEN_MINUS) 193 194 DEFINE_VK_INTERNAL(_OPEN_CURLY_BRACKET) 195 DEFINE_VK_INTERNAL(_CLOSE_CURLY_BRACKET) 196 197 DEFINE_VK_INTERNAL(_TILDE) 198 199 DEFINE_VK_INTERNAL(_VOLUME_MUTE) 200 DEFINE_VK_INTERNAL(_VOLUME_DOWN) 201 DEFINE_VK_INTERNAL(_VOLUME_UP) 202 203 DEFINE_VK_INTERNAL(_COMMA) 204 DEFINE_VK_INTERNAL(_PERIOD) 205 DEFINE_VK_INTERNAL(_SLASH) 206 DEFINE_VK_INTERNAL(_BACK_QUOTE) 207 DEFINE_VK_INTERNAL(_OPEN_BRACKET) 208 DEFINE_VK_INTERNAL(_BACK_SLASH) 209 DEFINE_VK_INTERNAL(_CLOSE_BRACKET) 210 DEFINE_VK_INTERNAL(_QUOTE) 211 212 DEFINE_VK_INTERNAL(_META) 213 DEFINE_VK_INTERNAL(_ALTGR) 214 215 DEFINE_VK_INTERNAL(_WIN_ICO_HELP) 216 DEFINE_VK_INTERNAL(_WIN_ICO_00) 217 218 DEFINE_VK_INTERNAL(_PROCESSKEY) 219 220 DEFINE_VK_INTERNAL(_WIN_ICO_CLEAR) 221 DEFINE_VK_INTERNAL(_WIN_OEM_RESET) 222 DEFINE_VK_INTERNAL(_WIN_OEM_JUMP) 223 DEFINE_VK_INTERNAL(_WIN_OEM_PA1) 224 DEFINE_VK_INTERNAL(_WIN_OEM_PA2) 225 DEFINE_VK_INTERNAL(_WIN_OEM_PA3) 226 DEFINE_VK_INTERNAL(_WIN_OEM_WSCTRL) 227 DEFINE_VK_INTERNAL(_WIN_OEM_CUSEL) 228 DEFINE_VK_INTERNAL(_WIN_OEM_ATTN) 229 DEFINE_VK_INTERNAL(_WIN_OEM_FINISH) 230 DEFINE_VK_INTERNAL(_WIN_OEM_COPY) 231 DEFINE_VK_INTERNAL(_WIN_OEM_AUTO) 232 DEFINE_VK_INTERNAL(_WIN_OEM_ENLW) 233 DEFINE_VK_INTERNAL(_WIN_OEM_BACKTAB) 234 235 DEFINE_VK_INTERNAL(_ATTN) 236 DEFINE_VK_INTERNAL(_CRSEL) 237 DEFINE_VK_INTERNAL(_EXSEL) 238 DEFINE_VK_INTERNAL(_EREOF) 239 DEFINE_VK_INTERNAL(_PLAY) 240 DEFINE_VK_INTERNAL(_ZOOM) 241 DEFINE_VK_INTERNAL(_PA1) 242 DEFINE_VK_INTERNAL(_WIN_OEM_CLEAR) 243 244 #undef DEFINE_VK_INTERNAL 245 #undef DEFINE_VK_INTERNAL2 246