ebiten/internal/ui/keys.go

353 lines
5.7 KiB
Go
Raw Normal View History

2022-05-25 15:48:19 +02:00
// Copyright 2013 The Ebitengine Authors
2015-01-01 19:29:51 +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
package ui
2015-01-01 19:29:51 +01:00
2020-04-21 15:33:18 +02:00
import (
"fmt"
)
2015-01-01 19:29:51 +01:00
type Key int
const (
KeyA Key = iota
2015-01-06 18:25:26 +01:00
KeyB
KeyC
2015-01-07 03:00:15 +01:00
KeyD
KeyE
KeyF
KeyG
KeyH
KeyI
KeyJ
KeyK
KeyL
KeyM
KeyN
KeyO
KeyP
KeyQ
KeyR
KeyS
KeyT
KeyU
KeyV
KeyW
KeyX
KeyY
KeyZ
KeyAltLeft
KeyAltRight
KeyArrowDown
KeyArrowLeft
KeyArrowRight
KeyArrowUp
KeyBackquote
2017-04-13 20:09:00 +02:00
KeyBackslash
2015-01-07 03:22:25 +01:00
KeyBackspace
KeyBracketLeft
KeyBracketRight
2015-01-06 18:25:26 +01:00
KeyCapsLock
KeyComma
KeyContextMenu
KeyControlLeft
KeyControlRight
2015-01-06 18:25:26 +01:00
KeyDelete
KeyDigit0
KeyDigit1
KeyDigit2
KeyDigit3
KeyDigit4
KeyDigit5
KeyDigit6
KeyDigit7
KeyDigit8
KeyDigit9
2015-01-06 18:25:26 +01:00
KeyEnd
KeyEnter
2017-04-13 20:09:00 +02:00
KeyEqual
2015-01-06 18:25:26 +01:00
KeyEscape
KeyF1
KeyF2
KeyF3
KeyF4
KeyF5
KeyF6
KeyF7
KeyF8
KeyF9
2015-01-07 03:00:15 +01:00
KeyF10
KeyF11
KeyF12
2015-01-06 18:25:26 +01:00
KeyHome
KeyInsert
KeyMetaLeft
KeyMetaRight
2017-04-13 20:09:00 +02:00
KeyMinus
2018-04-12 18:18:54 +02:00
KeyNumLock
KeyNumpad0
KeyNumpad1
KeyNumpad2
KeyNumpad3
KeyNumpad4
KeyNumpad5
KeyNumpad6
KeyNumpad7
KeyNumpad8
KeyNumpad9
KeyNumpadAdd
KeyNumpadDecimal
KeyNumpadDivide
KeyNumpadEnter
KeyNumpadEqual
KeyNumpadMultiply
KeyNumpadSubtract
2015-01-06 18:25:26 +01:00
KeyPageDown
KeyPageUp
KeyPause
2015-01-06 18:25:26 +01:00
KeyPeriod
KeyPrintScreen
KeyQuote
KeyScrollLock
2017-04-13 20:09:00 +02:00
KeySemicolon
KeyShiftLeft
KeyShiftRight
2017-04-13 20:09:00 +02:00
KeySlash
2015-01-01 19:29:51 +01:00
KeySpace
2015-01-06 18:25:26 +01:00
KeyTab
KeyReserved0
KeyReserved1
KeyReserved2
2020-10-11 11:33:40 +02:00
KeyReserved3
KeyMax = KeyReserved3
2015-01-01 19:29:51 +01:00
)
2020-04-21 15:33:18 +02:00
func (k Key) String() string {
switch k {
case KeyA:
return "KeyA"
case KeyB:
return "KeyB"
case KeyC:
return "KeyC"
case KeyD:
return "KeyD"
case KeyE:
return "KeyE"
case KeyF:
return "KeyF"
case KeyG:
return "KeyG"
case KeyH:
return "KeyH"
case KeyI:
return "KeyI"
case KeyJ:
return "KeyJ"
case KeyK:
return "KeyK"
case KeyL:
return "KeyL"
case KeyM:
return "KeyM"
case KeyN:
return "KeyN"
case KeyO:
return "KeyO"
case KeyP:
return "KeyP"
case KeyQ:
return "KeyQ"
case KeyR:
return "KeyR"
case KeyS:
return "KeyS"
case KeyT:
return "KeyT"
case KeyU:
return "KeyU"
case KeyV:
return "KeyV"
case KeyW:
return "KeyW"
case KeyX:
return "KeyX"
case KeyY:
return "KeyY"
case KeyZ:
return "KeyZ"
case KeyAltLeft:
return "KeyAltLeft"
case KeyAltRight:
return "KeyAltRight"
case KeyArrowDown:
return "KeyArrowDown"
case KeyArrowLeft:
return "KeyArrowLeft"
case KeyArrowRight:
return "KeyArrowRight"
case KeyArrowUp:
return "KeyArrowUp"
case KeyBackquote:
return "KeyBackquote"
2020-04-21 15:33:18 +02:00
case KeyBackslash:
return "KeyBackslash"
case KeyBackspace:
return "KeyBackspace"
case KeyBracketLeft:
return "KeyBracketLeft"
case KeyBracketRight:
return "KeyBracketRight"
2020-04-21 15:33:18 +02:00
case KeyCapsLock:
return "KeyCapsLock"
case KeyComma:
return "KeyComma"
case KeyContextMenu:
return "KeyContextMenu"
case KeyControlLeft:
return "KeyControlLeft"
case KeyControlRight:
return "KeyControlRight"
2020-04-21 15:33:18 +02:00
case KeyDelete:
return "KeyDelete"
case KeyDigit0:
return "KeyDigit0"
case KeyDigit1:
return "KeyDigit1"
case KeyDigit2:
return "KeyDigit2"
case KeyDigit3:
return "KeyDigit3"
case KeyDigit4:
return "KeyDigit4"
case KeyDigit5:
return "KeyDigit5"
case KeyDigit6:
return "KeyDigit6"
case KeyDigit7:
return "KeyDigit7"
case KeyDigit8:
return "KeyDigit8"
case KeyDigit9:
return "KeyDigit9"
2020-04-21 15:33:18 +02:00
case KeyEnd:
return "KeyEnd"
case KeyEnter:
return "KeyEnter"
case KeyEqual:
return "KeyEqual"
case KeyEscape:
return "KeyEscape"
case KeyF1:
return "KeyF1"
case KeyF2:
return "KeyF2"
case KeyF3:
return "KeyF3"
case KeyF4:
return "KeyF4"
case KeyF5:
return "KeyF5"
case KeyF6:
return "KeyF6"
case KeyF7:
return "KeyF7"
case KeyF8:
return "KeyF8"
case KeyF9:
return "KeyF9"
case KeyF10:
return "KeyF10"
case KeyF11:
return "KeyF11"
case KeyF12:
return "KeyF12"
case KeyHome:
return "KeyHome"
case KeyInsert:
return "KeyInsert"
case KeyMetaLeft:
return "KeyMetaLeft"
case KeyMetaRight:
return "KeyMetaRight"
2020-04-21 15:33:18 +02:00
case KeyMinus:
return "KeyMinus"
case KeyNumLock:
return "KeyNumLock"
case KeyNumpad0:
return "KeyNumpad0"
case KeyNumpad1:
return "KeyNumpad1"
case KeyNumpad2:
return "KeyNumpad2"
case KeyNumpad3:
return "KeyNumpad3"
case KeyNumpad4:
return "KeyNumpad4"
case KeyNumpad5:
return "KeyNumpad5"
case KeyNumpad6:
return "KeyNumpad6"
case KeyNumpad7:
return "KeyNumpad7"
case KeyNumpad8:
return "KeyNumpad8"
case KeyNumpad9:
return "KeyNumpad9"
case KeyNumpadAdd:
return "KeyNumpadAdd"
case KeyNumpadDecimal:
return "KeyNumpadDecimal"
case KeyNumpadDivide:
return "KeyNumpadDivide"
case KeyNumpadEnter:
return "KeyNumpadEnter"
case KeyNumpadEqual:
return "KeyNumpadEqual"
case KeyNumpadMultiply:
return "KeyNumpadMultiply"
case KeyNumpadSubtract:
return "KeyNumpadSubtract"
2020-04-21 15:33:18 +02:00
case KeyPageDown:
return "KeyPageDown"
case KeyPageUp:
return "KeyPageUp"
case KeyPause:
return "KeyPause"
case KeyPeriod:
return "KeyPeriod"
case KeyPrintScreen:
return "KeyPrintScreen"
case KeyQuote:
return "KeyQuote"
2020-04-21 15:33:18 +02:00
case KeyScrollLock:
return "KeyScrollLock"
case KeySemicolon:
return "KeySemicolon"
case KeyShiftLeft:
return "KeyShiftLeft"
case KeyShiftRight:
return "KeyShiftRight"
2020-04-21 15:33:18 +02:00
case KeySlash:
return "KeySlash"
case KeySpace:
return "KeySpace"
case KeyTab:
return "KeyTab"
}
panic(fmt.Sprintf("ui: invalid key: %d", k))
2020-04-21 15:33:18 +02:00
}