mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-14 06:57:27 +01:00
69b1d2e820
Updates #1437
234 lines
7.8 KiB
Go
234 lines
7.8 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 (
|
|
"syscall/js"
|
|
|
|
"github.com/hajimehoshi/ebiten/v2/internal/driver"
|
|
)
|
|
|
|
var driverKeyToJSKey = map[driver.Key]js.Value{
|
|
driver.Key0: js.ValueOf("Digit0"),
|
|
driver.Key1: js.ValueOf("Digit1"),
|
|
driver.Key2: js.ValueOf("Digit2"),
|
|
driver.Key3: js.ValueOf("Digit3"),
|
|
driver.Key4: js.ValueOf("Digit4"),
|
|
driver.Key5: js.ValueOf("Digit5"),
|
|
driver.Key6: js.ValueOf("Digit6"),
|
|
driver.Key7: js.ValueOf("Digit7"),
|
|
driver.Key8: js.ValueOf("Digit8"),
|
|
driver.Key9: js.ValueOf("Digit9"),
|
|
driver.KeyA: js.ValueOf("KeyA"),
|
|
driver.KeyApostrophe: js.ValueOf("Quote"),
|
|
driver.KeyB: js.ValueOf("KeyB"),
|
|
driver.KeyBackslash: js.ValueOf("Backslash"),
|
|
driver.KeyBackspace: js.ValueOf("Backspace"),
|
|
driver.KeyC: js.ValueOf("KeyC"),
|
|
driver.KeyCapsLock: js.ValueOf("CapsLock"),
|
|
driver.KeyComma: js.ValueOf("Comma"),
|
|
driver.KeyD: js.ValueOf("KeyD"),
|
|
driver.KeyDelete: js.ValueOf("Delete"),
|
|
driver.KeyDown: js.ValueOf("ArrowDown"),
|
|
driver.KeyE: js.ValueOf("KeyE"),
|
|
driver.KeyEnd: js.ValueOf("End"),
|
|
driver.KeyEnter: js.ValueOf("Enter"),
|
|
driver.KeyEqual: js.ValueOf("Equal"),
|
|
driver.KeyEscape: js.ValueOf("Escape"),
|
|
driver.KeyF: js.ValueOf("KeyF"),
|
|
driver.KeyF1: js.ValueOf("F1"),
|
|
driver.KeyF10: js.ValueOf("F10"),
|
|
driver.KeyF11: js.ValueOf("F11"),
|
|
driver.KeyF12: js.ValueOf("F12"),
|
|
driver.KeyF2: js.ValueOf("F2"),
|
|
driver.KeyF3: js.ValueOf("F3"),
|
|
driver.KeyF4: js.ValueOf("F4"),
|
|
driver.KeyF5: js.ValueOf("F5"),
|
|
driver.KeyF6: js.ValueOf("F6"),
|
|
driver.KeyF7: js.ValueOf("F7"),
|
|
driver.KeyF8: js.ValueOf("F8"),
|
|
driver.KeyF9: js.ValueOf("F9"),
|
|
driver.KeyG: js.ValueOf("KeyG"),
|
|
driver.KeyGraveAccent: js.ValueOf("Backquote"),
|
|
driver.KeyH: js.ValueOf("KeyH"),
|
|
driver.KeyHome: js.ValueOf("Home"),
|
|
driver.KeyI: js.ValueOf("KeyI"),
|
|
driver.KeyInsert: js.ValueOf("Insert"),
|
|
driver.KeyJ: js.ValueOf("KeyJ"),
|
|
driver.KeyK: js.ValueOf("KeyK"),
|
|
driver.KeyKP0: js.ValueOf("Numpad0"),
|
|
driver.KeyKP1: js.ValueOf("Numpad1"),
|
|
driver.KeyKP2: js.ValueOf("Numpad2"),
|
|
driver.KeyKP3: js.ValueOf("Numpad3"),
|
|
driver.KeyKP4: js.ValueOf("Numpad4"),
|
|
driver.KeyKP5: js.ValueOf("Numpad5"),
|
|
driver.KeyKP6: js.ValueOf("Numpad6"),
|
|
driver.KeyKP7: js.ValueOf("Numpad7"),
|
|
driver.KeyKP8: js.ValueOf("Numpad8"),
|
|
driver.KeyKP9: js.ValueOf("Numpad9"),
|
|
driver.KeyKPAdd: js.ValueOf("NumpadAdd"),
|
|
driver.KeyKPDecimal: js.ValueOf("NumpadDecimal"),
|
|
driver.KeyKPDivide: js.ValueOf("NumpadDivide"),
|
|
driver.KeyKPEnter: js.ValueOf("NumpadEnter"),
|
|
driver.KeyKPEqual: js.ValueOf("NumpadEqual"),
|
|
driver.KeyKPMultiply: js.ValueOf("NumpadMultiply"),
|
|
driver.KeyKPSubtract: js.ValueOf("NumpadSubtract"),
|
|
driver.KeyL: js.ValueOf("KeyL"),
|
|
driver.KeyLeft: js.ValueOf("ArrowLeft"),
|
|
driver.KeyLeftAlt: js.ValueOf("AltLeft"),
|
|
driver.KeyLeftBracket: js.ValueOf("BracketLeft"),
|
|
driver.KeyLeftControl: js.ValueOf("ControlLeft"),
|
|
driver.KeyLeftShift: js.ValueOf("ShiftLeft"),
|
|
driver.KeyLeftSuper: js.ValueOf("MetaLeft"),
|
|
driver.KeyM: js.ValueOf("KeyM"),
|
|
driver.KeyMenu: js.ValueOf("ContextMenu"),
|
|
driver.KeyMinus: js.ValueOf("Minus"),
|
|
driver.KeyN: js.ValueOf("KeyN"),
|
|
driver.KeyNumLock: js.ValueOf("NumLock"),
|
|
driver.KeyO: js.ValueOf("KeyO"),
|
|
driver.KeyP: js.ValueOf("KeyP"),
|
|
driver.KeyPageDown: js.ValueOf("PageDown"),
|
|
driver.KeyPageUp: js.ValueOf("PageUp"),
|
|
driver.KeyPause: js.ValueOf("Pause"),
|
|
driver.KeyPeriod: js.ValueOf("Period"),
|
|
driver.KeyPrintScreen: js.ValueOf("PrintScreen"),
|
|
driver.KeyQ: js.ValueOf("KeyQ"),
|
|
driver.KeyR: js.ValueOf("KeyR"),
|
|
driver.KeyRight: js.ValueOf("ArrowRight"),
|
|
driver.KeyRightAlt: js.ValueOf("AltRight"),
|
|
driver.KeyRightBracket: js.ValueOf("BracketRight"),
|
|
driver.KeyRightControl: js.ValueOf("ControlRight"),
|
|
driver.KeyRightShift: js.ValueOf("ShiftRight"),
|
|
driver.KeyRightSuper: js.ValueOf("MetaRight"),
|
|
driver.KeyS: js.ValueOf("KeyS"),
|
|
driver.KeyScrollLock: js.ValueOf("ScrollLock"),
|
|
driver.KeySemicolon: js.ValueOf("Semicolon"),
|
|
driver.KeySlash: js.ValueOf("Slash"),
|
|
driver.KeySpace: js.ValueOf("Space"),
|
|
driver.KeyT: js.ValueOf("KeyT"),
|
|
driver.KeyTab: js.ValueOf("Tab"),
|
|
driver.KeyU: js.ValueOf("KeyU"),
|
|
driver.KeyUp: js.ValueOf("ArrowUp"),
|
|
driver.KeyV: js.ValueOf("KeyV"),
|
|
driver.KeyW: js.ValueOf("KeyW"),
|
|
driver.KeyX: js.ValueOf("KeyX"),
|
|
driver.KeyY: js.ValueOf("KeyY"),
|
|
driver.KeyZ: js.ValueOf("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,
|
|
91: driver.KeyLeftSuper,
|
|
92: driver.KeyRightSuper,
|
|
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,
|
|
}
|