ebiten/internal/uidriver/glfw/keys.go

244 lines
9.4 KiB
Go
Raw Permalink 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
//go:build (darwin || freebsd || linux || windows) && !android && !ios
2017-05-11 12:09:13 +02:00
// +build darwin freebsd linux windows
// +build !android
2016-06-15 17:49:22 +02:00
// +build !ios
2015-01-06 16:05:46 +01:00
package glfw
2015-01-06 16:05:46 +01:00
import (
2020-10-03 19:35:13 +02:00
"github.com/hajimehoshi/ebiten/v2/internal/driver"
"github.com/hajimehoshi/ebiten/v2/internal/glfw"
2015-01-06 16:05:46 +01:00
)
2020-02-19 02:42:42 +01:00
var glfwKeyToDriverKey = map[glfw.Key]driver.Key{
2019-03-30 15:28:07 +01:00
glfw.KeyA: driver.KeyA,
glfw.KeyLeftAlt: driver.KeyAltLeft,
glfw.KeyRightAlt: driver.KeyAltRight,
glfw.KeyDown: driver.KeyArrowDown,
glfw.KeyLeft: driver.KeyArrowLeft,
glfw.KeyRight: driver.KeyArrowRight,
glfw.KeyUp: driver.KeyArrowUp,
2019-03-30 15:28:07 +01:00
glfw.KeyB: driver.KeyB,
glfw.KeyGraveAccent: driver.KeyBackquote,
2019-03-30 15:28:07 +01:00
glfw.KeyBackslash: driver.KeyBackslash,
glfw.KeyBackspace: driver.KeyBackspace,
glfw.KeyLeftBracket: driver.KeyBracketLeft,
glfw.KeyRightBracket: driver.KeyBracketRight,
glfw.KeyC: driver.KeyC,
2019-03-30 15:28:07 +01:00
glfw.KeyCapsLock: driver.KeyCapsLock,
glfw.KeyComma: driver.KeyComma,
glfw.KeyMenu: driver.KeyContextMenu,
glfw.KeyLeftControl: driver.KeyControlLeft,
glfw.KeyRightControl: driver.KeyControlRight,
glfw.KeyD: driver.KeyD,
2019-03-30 15:28:07 +01:00
glfw.KeyDelete: driver.KeyDelete,
glfw.Key0: driver.KeyDigit0,
glfw.Key1: driver.KeyDigit1,
glfw.Key2: driver.KeyDigit2,
glfw.Key3: driver.KeyDigit3,
glfw.Key4: driver.KeyDigit4,
glfw.Key5: driver.KeyDigit5,
glfw.Key6: driver.KeyDigit6,
glfw.Key7: driver.KeyDigit7,
glfw.Key8: driver.KeyDigit8,
glfw.Key9: driver.KeyDigit9,
glfw.KeyE: driver.KeyE,
2019-03-30 15:28:07 +01:00
glfw.KeyEnd: driver.KeyEnd,
glfw.KeyEnter: driver.KeyEnter,
glfw.KeyEqual: driver.KeyEqual,
glfw.KeyEscape: driver.KeyEscape,
glfw.KeyF: driver.KeyF,
2019-03-30 15:28:07 +01:00
glfw.KeyF1: driver.KeyF1,
glfw.KeyF10: driver.KeyF10,
glfw.KeyF11: driver.KeyF11,
glfw.KeyF12: driver.KeyF12,
2019-03-30 15:28:07 +01:00
glfw.KeyF2: driver.KeyF2,
glfw.KeyF3: driver.KeyF3,
glfw.KeyF4: driver.KeyF4,
glfw.KeyF5: driver.KeyF5,
glfw.KeyF6: driver.KeyF6,
glfw.KeyF7: driver.KeyF7,
glfw.KeyF8: driver.KeyF8,
glfw.KeyF9: driver.KeyF9,
glfw.KeyG: driver.KeyG,
glfw.KeyH: driver.KeyH,
2019-03-30 15:28:07 +01:00
glfw.KeyHome: driver.KeyHome,
glfw.KeyI: driver.KeyI,
2019-03-30 15:28:07 +01:00
glfw.KeyInsert: driver.KeyInsert,
glfw.KeyJ: driver.KeyJ,
glfw.KeyK: driver.KeyK,
glfw.KeyL: driver.KeyL,
glfw.KeyM: driver.KeyM,
glfw.KeyLeftSuper: driver.KeyMetaLeft,
glfw.KeyRightSuper: driver.KeyMetaRight,
2019-03-30 15:28:07 +01:00
glfw.KeyMinus: driver.KeyMinus,
glfw.KeyN: driver.KeyN,
2019-03-30 15:28:07 +01:00
glfw.KeyNumLock: driver.KeyNumLock,
glfw.KeyKP0: driver.KeyNumpad0,
glfw.KeyKP1: driver.KeyNumpad1,
glfw.KeyKP2: driver.KeyNumpad2,
glfw.KeyKP3: driver.KeyNumpad3,
glfw.KeyKP4: driver.KeyNumpad4,
glfw.KeyKP5: driver.KeyNumpad5,
glfw.KeyKP6: driver.KeyNumpad6,
glfw.KeyKP7: driver.KeyNumpad7,
glfw.KeyKP8: driver.KeyNumpad8,
glfw.KeyKP9: driver.KeyNumpad9,
glfw.KeyKPAdd: driver.KeyNumpadAdd,
glfw.KeyKPDecimal: driver.KeyNumpadDecimal,
glfw.KeyKPDivide: driver.KeyNumpadDivide,
glfw.KeyKPEnter: driver.KeyNumpadEnter,
glfw.KeyKPEqual: driver.KeyNumpadEqual,
glfw.KeyKPMultiply: driver.KeyNumpadMultiply,
glfw.KeyKPSubtract: driver.KeyNumpadSubtract,
glfw.KeyO: driver.KeyO,
glfw.KeyP: driver.KeyP,
2019-03-30 15:28:07 +01:00
glfw.KeyPageDown: driver.KeyPageDown,
glfw.KeyPageUp: driver.KeyPageUp,
glfw.KeyPause: driver.KeyPause,
glfw.KeyPeriod: driver.KeyPeriod,
glfw.KeyPrintScreen: driver.KeyPrintScreen,
glfw.KeyQ: driver.KeyQ,
glfw.KeyApostrophe: driver.KeyQuote,
glfw.KeyR: driver.KeyR,
glfw.KeyS: driver.KeyS,
2019-03-30 15:28:07 +01:00
glfw.KeyScrollLock: driver.KeyScrollLock,
glfw.KeySemicolon: driver.KeySemicolon,
glfw.KeyLeftShift: driver.KeyShiftLeft,
glfw.KeyRightShift: driver.KeyShiftRight,
2019-03-30 15:28:07 +01:00
glfw.KeySlash: driver.KeySlash,
glfw.KeySpace: driver.KeySpace,
glfw.KeyT: driver.KeyT,
2019-03-30 15:28:07 +01:00
glfw.KeyTab: driver.KeyTab,
glfw.KeyU: driver.KeyU,
glfw.KeyV: driver.KeyV,
glfw.KeyW: driver.KeyW,
glfw.KeyX: driver.KeyX,
glfw.KeyY: driver.KeyY,
glfw.KeyZ: driver.KeyZ,
2015-01-06 16:05:46 +01:00
}
2020-02-19 02:42:42 +01:00
var driverKeyToGLFWKey = map[driver.Key]glfw.Key{
driver.KeyA: glfw.KeyA,
driver.KeyAltLeft: glfw.KeyLeftAlt,
driver.KeyAltRight: glfw.KeyRightAlt,
driver.KeyArrowDown: glfw.KeyDown,
driver.KeyArrowLeft: glfw.KeyLeft,
driver.KeyArrowRight: glfw.KeyRight,
driver.KeyArrowUp: glfw.KeyUp,
driver.KeyB: glfw.KeyB,
driver.KeyBackquote: glfw.KeyGraveAccent,
driver.KeyBackslash: glfw.KeyBackslash,
driver.KeyBackspace: glfw.KeyBackspace,
driver.KeyBracketLeft: glfw.KeyLeftBracket,
driver.KeyBracketRight: glfw.KeyRightBracket,
driver.KeyC: glfw.KeyC,
driver.KeyCapsLock: glfw.KeyCapsLock,
driver.KeyComma: glfw.KeyComma,
driver.KeyContextMenu: glfw.KeyMenu,
driver.KeyControlLeft: glfw.KeyLeftControl,
driver.KeyControlRight: glfw.KeyRightControl,
driver.KeyD: glfw.KeyD,
driver.KeyDelete: glfw.KeyDelete,
driver.KeyDigit0: glfw.Key0,
driver.KeyDigit1: glfw.Key1,
driver.KeyDigit2: glfw.Key2,
driver.KeyDigit3: glfw.Key3,
driver.KeyDigit4: glfw.Key4,
driver.KeyDigit5: glfw.Key5,
driver.KeyDigit6: glfw.Key6,
driver.KeyDigit7: glfw.Key7,
driver.KeyDigit8: glfw.Key8,
driver.KeyDigit9: glfw.Key9,
driver.KeyE: glfw.KeyE,
driver.KeyEnd: glfw.KeyEnd,
driver.KeyEnter: glfw.KeyEnter,
driver.KeyEqual: glfw.KeyEqual,
driver.KeyEscape: glfw.KeyEscape,
driver.KeyF: glfw.KeyF,
driver.KeyF1: glfw.KeyF1,
driver.KeyF10: glfw.KeyF10,
driver.KeyF11: glfw.KeyF11,
driver.KeyF12: glfw.KeyF12,
driver.KeyF2: glfw.KeyF2,
driver.KeyF3: glfw.KeyF3,
driver.KeyF4: glfw.KeyF4,
driver.KeyF5: glfw.KeyF5,
driver.KeyF6: glfw.KeyF6,
driver.KeyF7: glfw.KeyF7,
driver.KeyF8: glfw.KeyF8,
driver.KeyF9: glfw.KeyF9,
driver.KeyG: glfw.KeyG,
driver.KeyH: glfw.KeyH,
driver.KeyHome: glfw.KeyHome,
driver.KeyI: glfw.KeyI,
driver.KeyInsert: glfw.KeyInsert,
driver.KeyJ: glfw.KeyJ,
driver.KeyK: glfw.KeyK,
driver.KeyL: glfw.KeyL,
driver.KeyM: glfw.KeyM,
driver.KeyMetaLeft: glfw.KeyLeftSuper,
driver.KeyMetaRight: glfw.KeyRightSuper,
driver.KeyMinus: glfw.KeyMinus,
driver.KeyN: glfw.KeyN,
driver.KeyNumLock: glfw.KeyNumLock,
driver.KeyNumpad0: glfw.KeyKP0,
driver.KeyNumpad1: glfw.KeyKP1,
driver.KeyNumpad2: glfw.KeyKP2,
driver.KeyNumpad3: glfw.KeyKP3,
driver.KeyNumpad4: glfw.KeyKP4,
driver.KeyNumpad5: glfw.KeyKP5,
driver.KeyNumpad6: glfw.KeyKP6,
driver.KeyNumpad7: glfw.KeyKP7,
driver.KeyNumpad8: glfw.KeyKP8,
driver.KeyNumpad9: glfw.KeyKP9,
driver.KeyNumpadAdd: glfw.KeyKPAdd,
driver.KeyNumpadDecimal: glfw.KeyKPDecimal,
driver.KeyNumpadDivide: glfw.KeyKPDivide,
driver.KeyNumpadEnter: glfw.KeyKPEnter,
driver.KeyNumpadEqual: glfw.KeyKPEqual,
driver.KeyNumpadMultiply: glfw.KeyKPMultiply,
driver.KeyNumpadSubtract: glfw.KeyKPSubtract,
driver.KeyO: glfw.KeyO,
driver.KeyP: glfw.KeyP,
driver.KeyPageDown: glfw.KeyPageDown,
driver.KeyPageUp: glfw.KeyPageUp,
driver.KeyPause: glfw.KeyPause,
driver.KeyPeriod: glfw.KeyPeriod,
driver.KeyPrintScreen: glfw.KeyPrintScreen,
driver.KeyQ: glfw.KeyQ,
driver.KeyQuote: glfw.KeyApostrophe,
driver.KeyR: glfw.KeyR,
driver.KeyS: glfw.KeyS,
driver.KeyScrollLock: glfw.KeyScrollLock,
driver.KeySemicolon: glfw.KeySemicolon,
driver.KeyShiftLeft: glfw.KeyLeftShift,
driver.KeyShiftRight: glfw.KeyRightShift,
driver.KeySlash: glfw.KeySlash,
driver.KeySpace: glfw.KeySpace,
driver.KeyT: glfw.KeyT,
driver.KeyTab: glfw.KeyTab,
driver.KeyU: glfw.KeyU,
driver.KeyV: glfw.KeyV,
driver.KeyW: glfw.KeyW,
driver.KeyX: glfw.KeyX,
driver.KeyY: glfw.KeyY,
driver.KeyZ: glfw.KeyZ,
}