ebiten/internal/uidriver/js/keys_js.go
2020-10-07 01:33:10 +09:00

228 lines
6.4 KiB
Go

// Copyright 2013 The Ebiten Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by genkeys.go using 'go generate'. DO NOT EDIT.
package js
import (
"github.com/hajimehoshi/ebiten/v2/internal/driver"
)
var driverKeyToJSKey = map[driver.Key]string{
driver.Key0: "Digit0",
driver.Key1: "Digit1",
driver.Key2: "Digit2",
driver.Key3: "Digit3",
driver.Key4: "Digit4",
driver.Key5: "Digit5",
driver.Key6: "Digit6",
driver.Key7: "Digit7",
driver.Key8: "Digit8",
driver.Key9: "Digit9",
driver.KeyA: "KeyA",
driver.KeyApostrophe: "Quote",
driver.KeyB: "KeyB",
driver.KeyBackslash: "Backslash",
driver.KeyBackspace: "Backspace",
driver.KeyC: "KeyC",
driver.KeyCapsLock: "CapsLock",
driver.KeyComma: "Comma",
driver.KeyD: "KeyD",
driver.KeyDelete: "Delete",
driver.KeyDown: "ArrowDown",
driver.KeyE: "KeyE",
driver.KeyEnd: "End",
driver.KeyEnter: "Enter",
driver.KeyEqual: "Equal",
driver.KeyEscape: "Escape",
driver.KeyF: "KeyF",
driver.KeyF1: "F1",
driver.KeyF10: "F10",
driver.KeyF11: "F11",
driver.KeyF12: "F12",
driver.KeyF2: "F2",
driver.KeyF3: "F3",
driver.KeyF4: "F4",
driver.KeyF5: "F5",
driver.KeyF6: "F6",
driver.KeyF7: "F7",
driver.KeyF8: "F8",
driver.KeyF9: "F9",
driver.KeyG: "KeyG",
driver.KeyGraveAccent: "Backquote",
driver.KeyH: "KeyH",
driver.KeyHome: "Home",
driver.KeyI: "KeyI",
driver.KeyInsert: "Insert",
driver.KeyJ: "KeyJ",
driver.KeyK: "KeyK",
driver.KeyKP0: "Numpad0",
driver.KeyKP1: "Numpad1",
driver.KeyKP2: "Numpad2",
driver.KeyKP3: "Numpad3",
driver.KeyKP4: "Numpad4",
driver.KeyKP5: "Numpad5",
driver.KeyKP6: "Numpad6",
driver.KeyKP7: "Numpad7",
driver.KeyKP8: "Numpad8",
driver.KeyKP9: "Numpad9",
driver.KeyKPAdd: "NumpadAdd",
driver.KeyKPDecimal: "NumpadDecimal",
driver.KeyKPDivide: "NumpadDivide",
driver.KeyKPEnter: "NumpadEnter",
driver.KeyKPEqual: "NumpadEqual",
driver.KeyKPMultiply: "NumpadMultiply",
driver.KeyKPSubtract: "NumpadSubtract",
driver.KeyL: "KeyL",
driver.KeyLeft: "ArrowLeft",
driver.KeyLeftAlt: "AltLeft",
driver.KeyLeftBracket: "BracketLeft",
driver.KeyLeftControl: "ControlLeft",
driver.KeyLeftShift: "ShiftLeft",
driver.KeyM: "KeyM",
driver.KeyMenu: "ContextMenu",
driver.KeyMinus: "Minus",
driver.KeyN: "KeyN",
driver.KeyNumLock: "NumLock",
driver.KeyO: "KeyO",
driver.KeyP: "KeyP",
driver.KeyPageDown: "PageDown",
driver.KeyPageUp: "PageUp",
driver.KeyPause: "Pause",
driver.KeyPeriod: "Period",
driver.KeyPrintScreen: "PrintScreen",
driver.KeyQ: "KeyQ",
driver.KeyR: "KeyR",
driver.KeyRight: "ArrowRight",
driver.KeyRightAlt: "AltRight",
driver.KeyRightBracket: "BracketRight",
driver.KeyRightControl: "ControlRight",
driver.KeyRightShift: "ShiftRight",
driver.KeyS: "KeyS",
driver.KeyScrollLock: "ScrollLock",
driver.KeySemicolon: "Semicolon",
driver.KeySlash: "Slash",
driver.KeySpace: "Space",
driver.KeyT: "KeyT",
driver.KeyTab: "Tab",
driver.KeyU: "KeyU",
driver.KeyUp: "ArrowUp",
driver.KeyV: "KeyV",
driver.KeyW: "KeyW",
driver.KeyX: "KeyX",
driver.KeyY: "KeyY",
driver.KeyZ: "KeyZ",
}
var edgeKeyCodeToDriverKey = map[int]driver.Key{
8: driver.KeyBackspace,
9: driver.KeyTab,
13: driver.KeyEnter,
16: driver.KeyLeftShift,
17: driver.KeyLeftControl,
18: driver.KeyLeftAlt,
19: driver.KeyPause,
20: driver.KeyCapsLock,
27: driver.KeyEscape,
32: driver.KeySpace,
33: driver.KeyPageUp,
34: driver.KeyPageDown,
35: driver.KeyEnd,
36: driver.KeyHome,
37: driver.KeyLeft,
38: driver.KeyUp,
39: driver.KeyRight,
40: driver.KeyDown,
45: driver.KeyInsert,
46: driver.KeyDelete,
48: driver.Key0,
49: driver.Key1,
50: driver.Key2,
51: driver.Key3,
52: driver.Key4,
53: driver.Key5,
54: driver.Key6,
55: driver.Key7,
56: driver.Key8,
57: driver.Key9,
65: driver.KeyA,
66: driver.KeyB,
67: driver.KeyC,
68: driver.KeyD,
69: driver.KeyE,
70: driver.KeyF,
71: driver.KeyG,
72: driver.KeyH,
73: driver.KeyI,
74: driver.KeyJ,
75: driver.KeyK,
76: driver.KeyL,
77: driver.KeyM,
78: driver.KeyN,
79: driver.KeyO,
80: driver.KeyP,
81: driver.KeyQ,
82: driver.KeyR,
83: driver.KeyS,
84: driver.KeyT,
85: driver.KeyU,
86: driver.KeyV,
87: driver.KeyW,
88: driver.KeyX,
89: driver.KeyY,
90: driver.KeyZ,
93: driver.KeyMenu,
96: driver.KeyKP0,
97: driver.KeyKP1,
98: driver.KeyKP2,
99: driver.KeyKP3,
100: driver.KeyKP4,
101: driver.KeyKP5,
102: driver.KeyKP6,
103: driver.KeyKP7,
104: driver.KeyKP8,
105: driver.KeyKP9,
106: driver.KeyKPMultiply,
107: driver.KeyKPAdd,
109: driver.KeyKPSubtract,
110: driver.KeyKPDecimal,
111: driver.KeyKPDivide,
112: driver.KeyF1,
113: driver.KeyF2,
114: driver.KeyF3,
115: driver.KeyF4,
116: driver.KeyF5,
117: driver.KeyF6,
118: driver.KeyF7,
119: driver.KeyF8,
120: driver.KeyF9,
121: driver.KeyF10,
122: driver.KeyF11,
123: driver.KeyF12,
144: driver.KeyNumLock,
145: driver.KeyScrollLock,
186: driver.KeySemicolon,
187: driver.KeyEqual,
188: driver.KeyComma,
189: driver.KeyMinus,
190: driver.KeyPeriod,
191: driver.KeySlash,
192: driver.KeyGraveAccent,
219: driver.KeyLeftBracket,
220: driver.KeyBackslash,
221: driver.KeyRightBracket,
222: driver.KeyApostrophe,
}