keys_js.go (6563B)
1 // Copyright 2013 The Ebiten Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Code generated by genkeys.go using 'go generate'. DO NOT EDIT. 16 17 package js 18 19 import ( 20 "github.com/hajimehoshi/ebiten/v2/internal/driver" 21 ) 22 23 var driverKeyToJSKey = map[driver.Key]string{ 24 driver.Key0: "Digit0", 25 driver.Key1: "Digit1", 26 driver.Key2: "Digit2", 27 driver.Key3: "Digit3", 28 driver.Key4: "Digit4", 29 driver.Key5: "Digit5", 30 driver.Key6: "Digit6", 31 driver.Key7: "Digit7", 32 driver.Key8: "Digit8", 33 driver.Key9: "Digit9", 34 driver.KeyA: "KeyA", 35 driver.KeyApostrophe: "Quote", 36 driver.KeyB: "KeyB", 37 driver.KeyBackslash: "Backslash", 38 driver.KeyBackspace: "Backspace", 39 driver.KeyC: "KeyC", 40 driver.KeyCapsLock: "CapsLock", 41 driver.KeyComma: "Comma", 42 driver.KeyD: "KeyD", 43 driver.KeyDelete: "Delete", 44 driver.KeyDown: "ArrowDown", 45 driver.KeyE: "KeyE", 46 driver.KeyEnd: "End", 47 driver.KeyEnter: "Enter", 48 driver.KeyEqual: "Equal", 49 driver.KeyEscape: "Escape", 50 driver.KeyF: "KeyF", 51 driver.KeyF1: "F1", 52 driver.KeyF10: "F10", 53 driver.KeyF11: "F11", 54 driver.KeyF12: "F12", 55 driver.KeyF2: "F2", 56 driver.KeyF3: "F3", 57 driver.KeyF4: "F4", 58 driver.KeyF5: "F5", 59 driver.KeyF6: "F6", 60 driver.KeyF7: "F7", 61 driver.KeyF8: "F8", 62 driver.KeyF9: "F9", 63 driver.KeyG: "KeyG", 64 driver.KeyGraveAccent: "Backquote", 65 driver.KeyH: "KeyH", 66 driver.KeyHome: "Home", 67 driver.KeyI: "KeyI", 68 driver.KeyInsert: "Insert", 69 driver.KeyJ: "KeyJ", 70 driver.KeyK: "KeyK", 71 driver.KeyKP0: "Numpad0", 72 driver.KeyKP1: "Numpad1", 73 driver.KeyKP2: "Numpad2", 74 driver.KeyKP3: "Numpad3", 75 driver.KeyKP4: "Numpad4", 76 driver.KeyKP5: "Numpad5", 77 driver.KeyKP6: "Numpad6", 78 driver.KeyKP7: "Numpad7", 79 driver.KeyKP8: "Numpad8", 80 driver.KeyKP9: "Numpad9", 81 driver.KeyKPAdd: "NumpadAdd", 82 driver.KeyKPDecimal: "NumpadDecimal", 83 driver.KeyKPDivide: "NumpadDivide", 84 driver.KeyKPEnter: "NumpadEnter", 85 driver.KeyKPEqual: "NumpadEqual", 86 driver.KeyKPMultiply: "NumpadMultiply", 87 driver.KeyKPSubtract: "NumpadSubtract", 88 driver.KeyL: "KeyL", 89 driver.KeyLeft: "ArrowLeft", 90 driver.KeyLeftAlt: "AltLeft", 91 driver.KeyLeftBracket: "BracketLeft", 92 driver.KeyLeftControl: "ControlLeft", 93 driver.KeyLeftShift: "ShiftLeft", 94 driver.KeyM: "KeyM", 95 driver.KeyMenu: "ContextMenu", 96 driver.KeyMinus: "Minus", 97 driver.KeyN: "KeyN", 98 driver.KeyNumLock: "NumLock", 99 driver.KeyO: "KeyO", 100 driver.KeyP: "KeyP", 101 driver.KeyPageDown: "PageDown", 102 driver.KeyPageUp: "PageUp", 103 driver.KeyPause: "Pause", 104 driver.KeyPeriod: "Period", 105 driver.KeyPrintScreen: "PrintScreen", 106 driver.KeyQ: "KeyQ", 107 driver.KeyR: "KeyR", 108 driver.KeyRight: "ArrowRight", 109 driver.KeyRightAlt: "AltRight", 110 driver.KeyRightBracket: "BracketRight", 111 driver.KeyRightControl: "ControlRight", 112 driver.KeyRightShift: "ShiftRight", 113 driver.KeyS: "KeyS", 114 driver.KeyScrollLock: "ScrollLock", 115 driver.KeySemicolon: "Semicolon", 116 driver.KeySlash: "Slash", 117 driver.KeySpace: "Space", 118 driver.KeyT: "KeyT", 119 driver.KeyTab: "Tab", 120 driver.KeyU: "KeyU", 121 driver.KeyUp: "ArrowUp", 122 driver.KeyV: "KeyV", 123 driver.KeyW: "KeyW", 124 driver.KeyX: "KeyX", 125 driver.KeyY: "KeyY", 126 driver.KeyZ: "KeyZ", 127 } 128 129 var edgeKeyCodeToDriverKey = map[int]driver.Key{ 130 8: driver.KeyBackspace, 131 9: driver.KeyTab, 132 13: driver.KeyEnter, 133 16: driver.KeyLeftShift, 134 17: driver.KeyLeftControl, 135 18: driver.KeyLeftAlt, 136 19: driver.KeyPause, 137 20: driver.KeyCapsLock, 138 27: driver.KeyEscape, 139 32: driver.KeySpace, 140 33: driver.KeyPageUp, 141 34: driver.KeyPageDown, 142 35: driver.KeyEnd, 143 36: driver.KeyHome, 144 37: driver.KeyLeft, 145 38: driver.KeyUp, 146 39: driver.KeyRight, 147 40: driver.KeyDown, 148 45: driver.KeyInsert, 149 46: driver.KeyDelete, 150 48: driver.Key0, 151 49: driver.Key1, 152 50: driver.Key2, 153 51: driver.Key3, 154 52: driver.Key4, 155 53: driver.Key5, 156 54: driver.Key6, 157 55: driver.Key7, 158 56: driver.Key8, 159 57: driver.Key9, 160 65: driver.KeyA, 161 66: driver.KeyB, 162 67: driver.KeyC, 163 68: driver.KeyD, 164 69: driver.KeyE, 165 70: driver.KeyF, 166 71: driver.KeyG, 167 72: driver.KeyH, 168 73: driver.KeyI, 169 74: driver.KeyJ, 170 75: driver.KeyK, 171 76: driver.KeyL, 172 77: driver.KeyM, 173 78: driver.KeyN, 174 79: driver.KeyO, 175 80: driver.KeyP, 176 81: driver.KeyQ, 177 82: driver.KeyR, 178 83: driver.KeyS, 179 84: driver.KeyT, 180 85: driver.KeyU, 181 86: driver.KeyV, 182 87: driver.KeyW, 183 88: driver.KeyX, 184 89: driver.KeyY, 185 90: driver.KeyZ, 186 93: driver.KeyMenu, 187 96: driver.KeyKP0, 188 97: driver.KeyKP1, 189 98: driver.KeyKP2, 190 99: driver.KeyKP3, 191 100: driver.KeyKP4, 192 101: driver.KeyKP5, 193 102: driver.KeyKP6, 194 103: driver.KeyKP7, 195 104: driver.KeyKP8, 196 105: driver.KeyKP9, 197 106: driver.KeyKPMultiply, 198 107: driver.KeyKPAdd, 199 109: driver.KeyKPSubtract, 200 110: driver.KeyKPDecimal, 201 111: driver.KeyKPDivide, 202 112: driver.KeyF1, 203 113: driver.KeyF2, 204 114: driver.KeyF3, 205 115: driver.KeyF4, 206 116: driver.KeyF5, 207 117: driver.KeyF6, 208 118: driver.KeyF7, 209 119: driver.KeyF8, 210 120: driver.KeyF9, 211 121: driver.KeyF10, 212 122: driver.KeyF11, 213 123: driver.KeyF12, 214 144: driver.KeyNumLock, 215 145: driver.KeyScrollLock, 216 186: driver.KeySemicolon, 217 187: driver.KeyEqual, 218 188: driver.KeyComma, 219 189: driver.KeyMinus, 220 190: driver.KeyPeriod, 221 191: driver.KeySlash, 222 192: driver.KeyGraveAccent, 223 219: driver.KeyLeftBracket, 224 220: driver.KeyBackslash, 225 221: driver.KeyRightBracket, 226 222: driver.KeyApostrophe, 227 }