ebiten/internal/uidriver/js/keys.go

436 lines
6.4 KiB
Go
Raw Normal View History

2016-08-26 17:50:26 +02:00
// Copyright 2013 The Ebiten Authors
2015-01-06 16:05:46 +01:00
//
// 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.
2015-01-07 15:21:52 +01:00
2015-01-06 16:05:46 +01:00
// +build js
package js
2015-01-06 16:05:46 +01:00
import (
"github.com/hajimehoshi/ebiten/internal/driver"
)
var keyToCodes = map[driver.Key][]string{
2019-03-30 15:28:07 +01:00
driver.Key0: {
"Digit0",
},
2019-03-30 15:28:07 +01:00
driver.Key1: {
"Digit1",
},
2019-03-30 15:28:07 +01:00
driver.Key2: {
"Digit2",
},
2019-03-30 15:28:07 +01:00
driver.Key3: {
"Digit3",
},
2019-03-30 15:28:07 +01:00
driver.Key4: {
"Digit4",
},
2019-03-30 15:28:07 +01:00
driver.Key5: {
"Digit5",
},
2019-03-30 15:28:07 +01:00
driver.Key6: {
"Digit6",
},
2019-03-30 15:28:07 +01:00
driver.Key7: {
"Digit7",
},
2019-03-30 15:28:07 +01:00
driver.Key8: {
"Digit8",
},
2019-03-30 15:28:07 +01:00
driver.Key9: {
"Digit9",
},
2019-03-30 15:28:07 +01:00
driver.KeyA: {
"KeyA",
},
2019-03-30 15:28:07 +01:00
driver.KeyApostrophe: {
"Quote",
},
2019-03-30 15:28:07 +01:00
driver.KeyB: {
"KeyB",
},
2019-03-30 15:28:07 +01:00
driver.KeyBackslash: {
"Backslash",
},
2019-03-30 15:28:07 +01:00
driver.KeyBackspace: {
"Backspace",
},
2019-03-30 15:28:07 +01:00
driver.KeyC: {
"KeyC",
},
2019-03-30 15:28:07 +01:00
driver.KeyCapsLock: {
"CapsLock",
},
2019-03-30 15:28:07 +01:00
driver.KeyComma: {
"Comma",
},
2019-03-30 15:28:07 +01:00
driver.KeyD: {
"KeyD",
},
2019-03-30 15:28:07 +01:00
driver.KeyDelete: {
"Delete",
},
2019-03-30 15:28:07 +01:00
driver.KeyDown: {
"ArrowDown",
},
2019-03-30 15:28:07 +01:00
driver.KeyE: {
"KeyE",
},
2019-03-30 15:28:07 +01:00
driver.KeyEnd: {
"End",
},
2019-03-30 15:28:07 +01:00
driver.KeyEnter: {
"Enter",
},
2019-03-30 15:28:07 +01:00
driver.KeyEqual: {
"Equal",
},
2019-03-30 15:28:07 +01:00
driver.KeyEscape: {
"Escape",
},
2019-03-30 15:28:07 +01:00
driver.KeyF: {
"KeyF",
},
2019-03-30 15:28:07 +01:00
driver.KeyF1: {
"F1",
},
2019-03-30 15:28:07 +01:00
driver.KeyF10: {
"F10",
},
2019-03-30 15:28:07 +01:00
driver.KeyF11: {
"F11",
},
2019-03-30 15:28:07 +01:00
driver.KeyF12: {
"F12",
},
2019-03-30 15:28:07 +01:00
driver.KeyF2: {
"F2",
},
2019-03-30 15:28:07 +01:00
driver.KeyF3: {
"F3",
},
2019-03-30 15:28:07 +01:00
driver.KeyF4: {
"F4",
},
2019-03-30 15:28:07 +01:00
driver.KeyF5: {
"F5",
},
2019-03-30 15:28:07 +01:00
driver.KeyF6: {
"F6",
},
2019-03-30 15:28:07 +01:00
driver.KeyF7: {
"F7",
},
2019-03-30 15:28:07 +01:00
driver.KeyF8: {
"F8",
},
2019-03-30 15:28:07 +01:00
driver.KeyF9: {
"F9",
},
2019-03-30 15:28:07 +01:00
driver.KeyG: {
"KeyG",
},
2019-03-30 15:28:07 +01:00
driver.KeyGraveAccent: {
"Backquote",
},
2019-03-30 15:28:07 +01:00
driver.KeyH: {
"KeyH",
},
2019-03-30 15:28:07 +01:00
driver.KeyHome: {
"Home",
},
2019-03-30 15:28:07 +01:00
driver.KeyI: {
"KeyI",
},
2019-03-30 15:28:07 +01:00
driver.KeyInsert: {
"Insert",
},
2019-03-30 15:28:07 +01:00
driver.KeyJ: {
"KeyJ",
},
2019-03-30 15:28:07 +01:00
driver.KeyK: {
"KeyK",
},
2019-03-30 15:28:07 +01:00
driver.KeyKP0: {
"Numpad0",
},
2019-03-30 15:28:07 +01:00
driver.KeyKP1: {
"Numpad1",
},
2019-03-30 15:28:07 +01:00
driver.KeyKP2: {
"Numpad2",
},
2019-03-30 15:28:07 +01:00
driver.KeyKP3: {
"Numpad3",
},
2019-03-30 15:28:07 +01:00
driver.KeyKP4: {
"Numpad4",
},
2019-03-30 15:28:07 +01:00
driver.KeyKP5: {
"Numpad5",
},
2019-03-30 15:28:07 +01:00
driver.KeyKP6: {
"Numpad6",
},
2019-03-30 15:28:07 +01:00
driver.KeyKP7: {
"Numpad7",
},
2019-03-30 15:28:07 +01:00
driver.KeyKP8: {
"Numpad8",
},
2019-03-30 15:28:07 +01:00
driver.KeyKP9: {
"Numpad9",
},
2019-03-30 15:28:07 +01:00
driver.KeyKPAdd: {
"NumpadAdd",
},
2019-03-30 15:28:07 +01:00
driver.KeyKPDecimal: {
"NumpadDecimal",
},
2019-03-30 15:28:07 +01:00
driver.KeyKPDivide: {
"NumpadDivide",
},
2019-03-30 15:28:07 +01:00
driver.KeyKPEnter: {
"NumpadEnter",
},
2019-03-30 15:28:07 +01:00
driver.KeyKPEqual: {
"NumpadEqual",
},
2019-03-30 15:28:07 +01:00
driver.KeyKPMultiply: {
"NumpadMultiply",
},
2019-03-30 15:28:07 +01:00
driver.KeyKPSubtract: {
"NumpadSubtract",
},
2019-03-30 15:28:07 +01:00
driver.KeyL: {
"KeyL",
},
2019-03-30 15:28:07 +01:00
driver.KeyLeft: {
"ArrowLeft",
},
driver.KeyLeftAlt: {
"AltLeft",
},
2019-03-30 15:28:07 +01:00
driver.KeyLeftBracket: {
"BracketLeft",
},
driver.KeyLeftControl: {
"ControlLeft",
},
driver.KeyLeftShift: {
"ShiftLeft",
},
2019-03-30 15:28:07 +01:00
driver.KeyM: {
"KeyM",
},
2019-03-30 15:28:07 +01:00
driver.KeyMenu: {
"ContextMenu",
},
2019-03-30 15:28:07 +01:00
driver.KeyMinus: {
"Minus",
},
2019-03-30 15:28:07 +01:00
driver.KeyN: {
"KeyN",
},
2019-03-30 15:28:07 +01:00
driver.KeyNumLock: {
2018-04-12 18:18:54 +02:00
"NumLock",
},
2019-03-30 15:28:07 +01:00
driver.KeyO: {
"KeyO",
},
2019-03-30 15:28:07 +01:00
driver.KeyP: {
"KeyP",
},
2019-03-30 15:28:07 +01:00
driver.KeyPageDown: {
"PageDown",
},
2019-03-30 15:28:07 +01:00
driver.KeyPageUp: {
"PageUp",
},
2019-03-30 15:28:07 +01:00
driver.KeyPause: {
"Pause",
},
2019-03-30 15:28:07 +01:00
driver.KeyPeriod: {
"Period",
},
2019-03-30 15:28:07 +01:00
driver.KeyPrintScreen: {
"PrintScreen",
},
2019-03-30 15:28:07 +01:00
driver.KeyQ: {
"KeyQ",
},
2019-03-30 15:28:07 +01:00
driver.KeyR: {
"KeyR",
},
2019-03-30 15:28:07 +01:00
driver.KeyRight: {
"ArrowRight",
},
driver.KeyRightAlt: {
"AltRight",
},
2019-03-30 15:28:07 +01:00
driver.KeyRightBracket: {
"BracketRight",
},
driver.KeyRightControl: {
"ControlRight",
},
driver.KeyRightShift: {
"ShiftRight",
},
2019-03-30 15:28:07 +01:00
driver.KeyS: {
"KeyS",
},
2019-03-30 15:28:07 +01:00
driver.KeyScrollLock: {
"ScrollLock",
},
2019-03-30 15:28:07 +01:00
driver.KeySemicolon: {
"Semicolon",
},
2019-03-30 15:28:07 +01:00
driver.KeySlash: {
"Slash",
},
2019-03-30 15:28:07 +01:00
driver.KeySpace: {
"Space",
},
2019-03-30 15:28:07 +01:00
driver.KeyT: {
"KeyT",
},
2019-03-30 15:28:07 +01:00
driver.KeyTab: {
"Tab",
},
2019-03-30 15:28:07 +01:00
driver.KeyU: {
"KeyU",
},
2019-03-30 15:28:07 +01:00
driver.KeyUp: {
"ArrowUp",
},
2019-03-30 15:28:07 +01:00
driver.KeyV: {
"KeyV",
},
2019-03-30 15:28:07 +01:00
driver.KeyW: {
"KeyW",
},
2019-03-30 15:28:07 +01:00
driver.KeyX: {
"KeyX",
},
2019-03-30 15:28:07 +01:00
driver.KeyY: {
"KeyY",
},
2019-03-30 15:28:07 +01:00
driver.KeyZ: {
"KeyZ",
},
}
var keyCodeToKeyEdge = map[int]driver.Key{
2019-03-30 15:28:07 +01:00
8: driver.KeyBackspace,
9: driver.KeyTab,
13: driver.KeyEnter,
16: driver.KeyLeftShift,
17: driver.KeyLeftControl,
18: driver.KeyLeftAlt,
2019-03-30 15:28:07 +01:00
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,
2015-01-06 16:05:46 +01:00
}