mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 13:07:26 +01:00
232 lines
6.6 KiB
Go
232 lines
6.6 KiB
Go
// Copyright 2013 The Ebitengine 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 ui
|
|
|
|
import (
|
|
"syscall/js"
|
|
)
|
|
|
|
var uiKeyToJSKey = map[Key]js.Value{
|
|
KeyA: js.ValueOf("KeyA"),
|
|
KeyAltLeft: js.ValueOf("AltLeft"),
|
|
KeyAltRight: js.ValueOf("AltRight"),
|
|
KeyArrowDown: js.ValueOf("ArrowDown"),
|
|
KeyArrowLeft: js.ValueOf("ArrowLeft"),
|
|
KeyArrowRight: js.ValueOf("ArrowRight"),
|
|
KeyArrowUp: js.ValueOf("ArrowUp"),
|
|
KeyB: js.ValueOf("KeyB"),
|
|
KeyBackquote: js.ValueOf("Backquote"),
|
|
KeyBackslash: js.ValueOf("Backslash"),
|
|
KeyBackspace: js.ValueOf("Backspace"),
|
|
KeyBracketLeft: js.ValueOf("BracketLeft"),
|
|
KeyBracketRight: js.ValueOf("BracketRight"),
|
|
KeyC: js.ValueOf("KeyC"),
|
|
KeyCapsLock: js.ValueOf("CapsLock"),
|
|
KeyComma: js.ValueOf("Comma"),
|
|
KeyContextMenu: js.ValueOf("ContextMenu"),
|
|
KeyControlLeft: js.ValueOf("ControlLeft"),
|
|
KeyControlRight: js.ValueOf("ControlRight"),
|
|
KeyD: js.ValueOf("KeyD"),
|
|
KeyDelete: js.ValueOf("Delete"),
|
|
KeyDigit0: js.ValueOf("Digit0"),
|
|
KeyDigit1: js.ValueOf("Digit1"),
|
|
KeyDigit2: js.ValueOf("Digit2"),
|
|
KeyDigit3: js.ValueOf("Digit3"),
|
|
KeyDigit4: js.ValueOf("Digit4"),
|
|
KeyDigit5: js.ValueOf("Digit5"),
|
|
KeyDigit6: js.ValueOf("Digit6"),
|
|
KeyDigit7: js.ValueOf("Digit7"),
|
|
KeyDigit8: js.ValueOf("Digit8"),
|
|
KeyDigit9: js.ValueOf("Digit9"),
|
|
KeyE: js.ValueOf("KeyE"),
|
|
KeyEnd: js.ValueOf("End"),
|
|
KeyEnter: js.ValueOf("Enter"),
|
|
KeyEqual: js.ValueOf("Equal"),
|
|
KeyEscape: js.ValueOf("Escape"),
|
|
KeyF: js.ValueOf("KeyF"),
|
|
KeyF1: js.ValueOf("F1"),
|
|
KeyF10: js.ValueOf("F10"),
|
|
KeyF11: js.ValueOf("F11"),
|
|
KeyF12: js.ValueOf("F12"),
|
|
KeyF2: js.ValueOf("F2"),
|
|
KeyF3: js.ValueOf("F3"),
|
|
KeyF4: js.ValueOf("F4"),
|
|
KeyF5: js.ValueOf("F5"),
|
|
KeyF6: js.ValueOf("F6"),
|
|
KeyF7: js.ValueOf("F7"),
|
|
KeyF8: js.ValueOf("F8"),
|
|
KeyF9: js.ValueOf("F9"),
|
|
KeyG: js.ValueOf("KeyG"),
|
|
KeyH: js.ValueOf("KeyH"),
|
|
KeyHome: js.ValueOf("Home"),
|
|
KeyI: js.ValueOf("KeyI"),
|
|
KeyInsert: js.ValueOf("Insert"),
|
|
KeyJ: js.ValueOf("KeyJ"),
|
|
KeyK: js.ValueOf("KeyK"),
|
|
KeyL: js.ValueOf("KeyL"),
|
|
KeyM: js.ValueOf("KeyM"),
|
|
KeyMetaLeft: js.ValueOf("MetaLeft"),
|
|
KeyMetaRight: js.ValueOf("MetaRight"),
|
|
KeyMinus: js.ValueOf("Minus"),
|
|
KeyN: js.ValueOf("KeyN"),
|
|
KeyNumLock: js.ValueOf("NumLock"),
|
|
KeyNumpad0: js.ValueOf("Numpad0"),
|
|
KeyNumpad1: js.ValueOf("Numpad1"),
|
|
KeyNumpad2: js.ValueOf("Numpad2"),
|
|
KeyNumpad3: js.ValueOf("Numpad3"),
|
|
KeyNumpad4: js.ValueOf("Numpad4"),
|
|
KeyNumpad5: js.ValueOf("Numpad5"),
|
|
KeyNumpad6: js.ValueOf("Numpad6"),
|
|
KeyNumpad7: js.ValueOf("Numpad7"),
|
|
KeyNumpad8: js.ValueOf("Numpad8"),
|
|
KeyNumpad9: js.ValueOf("Numpad9"),
|
|
KeyNumpadAdd: js.ValueOf("NumpadAdd"),
|
|
KeyNumpadDecimal: js.ValueOf("NumpadDecimal"),
|
|
KeyNumpadDivide: js.ValueOf("NumpadDivide"),
|
|
KeyNumpadEnter: js.ValueOf("NumpadEnter"),
|
|
KeyNumpadEqual: js.ValueOf("NumpadEqual"),
|
|
KeyNumpadMultiply: js.ValueOf("NumpadMultiply"),
|
|
KeyNumpadSubtract: js.ValueOf("NumpadSubtract"),
|
|
KeyO: js.ValueOf("KeyO"),
|
|
KeyP: js.ValueOf("KeyP"),
|
|
KeyPageDown: js.ValueOf("PageDown"),
|
|
KeyPageUp: js.ValueOf("PageUp"),
|
|
KeyPause: js.ValueOf("Pause"),
|
|
KeyPeriod: js.ValueOf("Period"),
|
|
KeyPrintScreen: js.ValueOf("PrintScreen"),
|
|
KeyQ: js.ValueOf("KeyQ"),
|
|
KeyQuote: js.ValueOf("Quote"),
|
|
KeyR: js.ValueOf("KeyR"),
|
|
KeyS: js.ValueOf("KeyS"),
|
|
KeyScrollLock: js.ValueOf("ScrollLock"),
|
|
KeySemicolon: js.ValueOf("Semicolon"),
|
|
KeyShiftLeft: js.ValueOf("ShiftLeft"),
|
|
KeyShiftRight: js.ValueOf("ShiftRight"),
|
|
KeySlash: js.ValueOf("Slash"),
|
|
KeySpace: js.ValueOf("Space"),
|
|
KeyT: js.ValueOf("KeyT"),
|
|
KeyTab: js.ValueOf("Tab"),
|
|
KeyU: js.ValueOf("KeyU"),
|
|
KeyV: js.ValueOf("KeyV"),
|
|
KeyW: js.ValueOf("KeyW"),
|
|
KeyX: js.ValueOf("KeyX"),
|
|
KeyY: js.ValueOf("KeyY"),
|
|
KeyZ: js.ValueOf("KeyZ"),
|
|
}
|
|
|
|
var edgeKeyCodeToUIKey = map[int]Key{
|
|
8: KeyBackspace,
|
|
9: KeyTab,
|
|
13: KeyEnter,
|
|
16: KeyShiftLeft,
|
|
17: KeyControlLeft,
|
|
18: KeyAltLeft,
|
|
19: KeyPause,
|
|
20: KeyCapsLock,
|
|
27: KeyEscape,
|
|
32: KeySpace,
|
|
33: KeyPageUp,
|
|
34: KeyPageDown,
|
|
35: KeyEnd,
|
|
36: KeyHome,
|
|
37: KeyArrowLeft,
|
|
38: KeyArrowUp,
|
|
39: KeyArrowRight,
|
|
40: KeyArrowDown,
|
|
45: KeyInsert,
|
|
46: KeyDelete,
|
|
48: KeyDigit0,
|
|
49: KeyDigit1,
|
|
50: KeyDigit2,
|
|
51: KeyDigit3,
|
|
52: KeyDigit4,
|
|
53: KeyDigit5,
|
|
54: KeyDigit6,
|
|
55: KeyDigit7,
|
|
56: KeyDigit8,
|
|
57: KeyDigit9,
|
|
65: KeyA,
|
|
66: KeyB,
|
|
67: KeyC,
|
|
68: KeyD,
|
|
69: KeyE,
|
|
70: KeyF,
|
|
71: KeyG,
|
|
72: KeyH,
|
|
73: KeyI,
|
|
74: KeyJ,
|
|
75: KeyK,
|
|
76: KeyL,
|
|
77: KeyM,
|
|
78: KeyN,
|
|
79: KeyO,
|
|
80: KeyP,
|
|
81: KeyQ,
|
|
82: KeyR,
|
|
83: KeyS,
|
|
84: KeyT,
|
|
85: KeyU,
|
|
86: KeyV,
|
|
87: KeyW,
|
|
88: KeyX,
|
|
89: KeyY,
|
|
90: KeyZ,
|
|
91: KeyMetaLeft,
|
|
92: KeyMetaRight,
|
|
93: KeyContextMenu,
|
|
96: KeyNumpad0,
|
|
97: KeyNumpad1,
|
|
98: KeyNumpad2,
|
|
99: KeyNumpad3,
|
|
100: KeyNumpad4,
|
|
101: KeyNumpad5,
|
|
102: KeyNumpad6,
|
|
103: KeyNumpad7,
|
|
104: KeyNumpad8,
|
|
105: KeyNumpad9,
|
|
106: KeyNumpadMultiply,
|
|
107: KeyNumpadAdd,
|
|
109: KeyNumpadSubtract,
|
|
110: KeyNumpadDecimal,
|
|
111: KeyNumpadDivide,
|
|
112: KeyF1,
|
|
113: KeyF2,
|
|
114: KeyF3,
|
|
115: KeyF4,
|
|
116: KeyF5,
|
|
117: KeyF6,
|
|
118: KeyF7,
|
|
119: KeyF8,
|
|
120: KeyF9,
|
|
121: KeyF10,
|
|
122: KeyF11,
|
|
123: KeyF12,
|
|
144: KeyNumLock,
|
|
145: KeyScrollLock,
|
|
186: KeySemicolon,
|
|
187: KeyEqual,
|
|
188: KeyComma,
|
|
189: KeyMinus,
|
|
190: KeyPeriod,
|
|
191: KeySlash,
|
|
192: KeyBackquote,
|
|
219: KeyBracketLeft,
|
|
220: KeyBackslash,
|
|
221: KeyBracketRight,
|
|
222: KeyQuote,
|
|
}
|