mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-27 04:08:53 +01:00
185 lines
3.8 KiB
Go
185 lines
3.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.
|
|
|
|
// DO NOT EDIT: This file is auto-generated by genkeys.go.
|
|
|
|
// +build js
|
|
|
|
package ui
|
|
|
|
var codeToKey = map[string]Key{
|
|
"AltLeft": KeyAlt,
|
|
"AltRight": KeyAlt,
|
|
"ArrowDown": KeyDown,
|
|
"ArrowLeft": KeyLeft,
|
|
"ArrowRight": KeyRight,
|
|
"ArrowUp": KeyUp,
|
|
"Backquote": KeyGraveAccent,
|
|
"Backslash": KeyBackslash,
|
|
"Backspace": KeyBackspace,
|
|
"BracketLeft": KeyLeftBracket,
|
|
"BracketRight": KeyRightBracket,
|
|
"CapsLock": KeyCapsLock,
|
|
"Comma": KeyComma,
|
|
"ControlLeft": KeyControl,
|
|
"ControlRight": KeyControl,
|
|
"Delete": KeyDelete,
|
|
"Digit0": Key0,
|
|
"Digit1": Key1,
|
|
"Digit2": Key2,
|
|
"Digit3": Key3,
|
|
"Digit4": Key4,
|
|
"Digit5": Key5,
|
|
"Digit6": Key6,
|
|
"Digit7": Key7,
|
|
"Digit8": Key8,
|
|
"Digit9": Key9,
|
|
"End": KeyEnd,
|
|
"Enter": KeyEnter,
|
|
"Equal": KeyEqual,
|
|
"Escape": KeyEscape,
|
|
"F1": KeyF1,
|
|
"F10": KeyF10,
|
|
"F11": KeyF11,
|
|
"F12": KeyF12,
|
|
"F2": KeyF2,
|
|
"F3": KeyF3,
|
|
"F4": KeyF4,
|
|
"F5": KeyF5,
|
|
"F6": KeyF6,
|
|
"F7": KeyF7,
|
|
"F8": KeyF8,
|
|
"F9": KeyF9,
|
|
"Home": KeyHome,
|
|
"Insert": KeyInsert,
|
|
"KeyA": KeyA,
|
|
"KeyB": KeyB,
|
|
"KeyC": KeyC,
|
|
"KeyD": KeyD,
|
|
"KeyE": KeyE,
|
|
"KeyF": KeyF,
|
|
"KeyG": KeyG,
|
|
"KeyH": KeyH,
|
|
"KeyI": KeyI,
|
|
"KeyJ": KeyJ,
|
|
"KeyK": KeyK,
|
|
"KeyL": KeyL,
|
|
"KeyM": KeyM,
|
|
"KeyN": KeyN,
|
|
"KeyO": KeyO,
|
|
"KeyP": KeyP,
|
|
"KeyQ": KeyQ,
|
|
"KeyR": KeyR,
|
|
"KeyS": KeyS,
|
|
"KeyT": KeyT,
|
|
"KeyU": KeyU,
|
|
"KeyV": KeyV,
|
|
"KeyW": KeyW,
|
|
"KeyX": KeyX,
|
|
"KeyY": KeyY,
|
|
"KeyZ": KeyZ,
|
|
"Minus": KeyMinus,
|
|
"PageDown": KeyPageDown,
|
|
"PageUp": KeyPageUp,
|
|
"Period": KeyPeriod,
|
|
"Quote": KeyApostrophe,
|
|
"Semicolon": KeySemicolon,
|
|
"ShiftLeft": KeyShift,
|
|
"ShiftRight": KeyShift,
|
|
"Slash": KeySlash,
|
|
"Space": KeySpace,
|
|
"Tab": KeyTab,
|
|
}
|
|
|
|
var keyCodeToKeySafari = map[int]Key{
|
|
8: KeyBackspace,
|
|
9: KeyTab,
|
|
13: KeyEnter,
|
|
16: KeyShift,
|
|
17: KeyControl,
|
|
18: KeyAlt,
|
|
20: KeyCapsLock,
|
|
27: KeyEscape,
|
|
32: KeySpace,
|
|
33: KeyPageUp,
|
|
34: KeyPageDown,
|
|
35: KeyEnd,
|
|
36: KeyHome,
|
|
37: KeyLeft,
|
|
38: KeyUp,
|
|
39: KeyRight,
|
|
40: KeyDown,
|
|
45: KeyInsert,
|
|
46: KeyDelete,
|
|
48: Key0,
|
|
49: Key1,
|
|
50: Key2,
|
|
51: Key3,
|
|
52: Key4,
|
|
53: Key5,
|
|
54: Key6,
|
|
55: Key7,
|
|
56: Key8,
|
|
57: Key9,
|
|
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,
|
|
112: KeyF1,
|
|
113: KeyF2,
|
|
114: KeyF3,
|
|
115: KeyF4,
|
|
116: KeyF5,
|
|
117: KeyF6,
|
|
118: KeyF7,
|
|
119: KeyF8,
|
|
120: KeyF9,
|
|
121: KeyF10,
|
|
122: KeyF11,
|
|
123: KeyF12,
|
|
186: KeySemicolon,
|
|
187: KeyEqual,
|
|
188: KeyComma,
|
|
189: KeyMinus,
|
|
190: KeyPeriod,
|
|
191: KeySlash,
|
|
192: KeyGraveAccent,
|
|
219: KeyLeftBracket,
|
|
220: KeyBackslash,
|
|
221: KeyRightBracket,
|
|
222: KeyApostrophe,
|
|
}
|