2016-08-26 17:50:26 +02:00
|
|
|
// Copyright 2013 The Ebiten 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.
|
|
|
|
|
2018-04-20 09:54:33 +02:00
|
|
|
// Code generated by genkeys.go using 'go generate'. DO NOT EDIT.
|
2015-01-07 15:21:52 +01:00
|
|
|
|
2019-03-30 15:28:07 +01:00
|
|
|
package driver
|
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 (
|
2015-01-06 18:25:26 +01:00
|
|
|
Key0 Key = iota
|
|
|
|
Key1
|
|
|
|
Key2
|
|
|
|
Key3
|
|
|
|
Key4
|
|
|
|
Key5
|
|
|
|
Key6
|
|
|
|
Key7
|
|
|
|
Key8
|
|
|
|
Key9
|
|
|
|
KeyA
|
|
|
|
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
|
2017-04-13 20:09:00 +02:00
|
|
|
KeyApostrophe
|
|
|
|
KeyBackslash
|
2015-01-07 03:22:25 +01:00
|
|
|
KeyBackspace
|
2015-01-06 18:25:26 +01:00
|
|
|
KeyCapsLock
|
|
|
|
KeyComma
|
|
|
|
KeyDelete
|
2015-01-01 19:29:51 +01:00
|
|
|
KeyDown
|
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
|
2017-04-13 20:09:00 +02:00
|
|
|
KeyGraveAccent
|
2015-01-06 18:25:26 +01:00
|
|
|
KeyHome
|
|
|
|
KeyInsert
|
2018-04-12 16:56:50 +02:00
|
|
|
KeyKP0
|
|
|
|
KeyKP1
|
|
|
|
KeyKP2
|
|
|
|
KeyKP3
|
|
|
|
KeyKP4
|
|
|
|
KeyKP5
|
|
|
|
KeyKP6
|
|
|
|
KeyKP7
|
|
|
|
KeyKP8
|
|
|
|
KeyKP9
|
|
|
|
KeyKPAdd
|
|
|
|
KeyKPDecimal
|
|
|
|
KeyKPDivide
|
|
|
|
KeyKPEnter
|
|
|
|
KeyKPEqual
|
|
|
|
KeyKPMultiply
|
|
|
|
KeyKPSubtract
|
2015-01-01 19:29:51 +01:00
|
|
|
KeyLeft
|
2019-09-01 15:47:40 +02:00
|
|
|
KeyLeftAlt
|
2017-04-13 20:09:00 +02:00
|
|
|
KeyLeftBracket
|
2019-09-01 15:47:40 +02:00
|
|
|
KeyLeftControl
|
|
|
|
KeyLeftShift
|
2020-10-11 11:33:40 +02:00
|
|
|
KeyLeftSuper
|
2018-04-21 18:36:28 +02:00
|
|
|
KeyMenu
|
2017-04-13 20:09:00 +02:00
|
|
|
KeyMinus
|
2018-04-12 18:18:54 +02:00
|
|
|
KeyNumLock
|
2015-01-06 18:25:26 +01:00
|
|
|
KeyPageDown
|
|
|
|
KeyPageUp
|
2018-04-21 18:36:28 +02:00
|
|
|
KeyPause
|
2015-01-06 18:25:26 +01:00
|
|
|
KeyPeriod
|
2018-04-21 18:36:28 +02:00
|
|
|
KeyPrintScreen
|
2015-01-01 19:29:51 +01:00
|
|
|
KeyRight
|
2019-09-01 15:47:40 +02:00
|
|
|
KeyRightAlt
|
2017-04-13 20:09:00 +02:00
|
|
|
KeyRightBracket
|
2019-09-01 15:47:40 +02:00
|
|
|
KeyRightControl
|
|
|
|
KeyRightShift
|
2020-10-11 11:33:40 +02:00
|
|
|
KeyRightSuper
|
2018-04-21 18:36:28 +02:00
|
|
|
KeyScrollLock
|
2017-04-13 20:09:00 +02:00
|
|
|
KeySemicolon
|
|
|
|
KeySlash
|
2015-01-01 19:29:51 +01:00
|
|
|
KeySpace
|
2015-01-06 18:25:26 +01:00
|
|
|
KeyTab
|
|
|
|
KeyUp
|
2019-09-01 15:47:40 +02:00
|
|
|
KeyReserved0
|
|
|
|
KeyReserved1
|
|
|
|
KeyReserved2
|
2020-10-11 11:33:40 +02:00
|
|
|
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 Key0:
|
|
|
|
return "Key0"
|
|
|
|
case Key1:
|
|
|
|
return "Key1"
|
|
|
|
case Key2:
|
|
|
|
return "Key2"
|
|
|
|
case Key3:
|
|
|
|
return "Key3"
|
|
|
|
case Key4:
|
|
|
|
return "Key4"
|
|
|
|
case Key5:
|
|
|
|
return "Key5"
|
|
|
|
case Key6:
|
|
|
|
return "Key6"
|
|
|
|
case Key7:
|
|
|
|
return "Key7"
|
|
|
|
case Key8:
|
|
|
|
return "Key8"
|
|
|
|
case Key9:
|
|
|
|
return "Key9"
|
|
|
|
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 KeyApostrophe:
|
|
|
|
return "KeyApostrophe"
|
|
|
|
case KeyBackslash:
|
|
|
|
return "KeyBackslash"
|
|
|
|
case KeyBackspace:
|
|
|
|
return "KeyBackspace"
|
|
|
|
case KeyCapsLock:
|
|
|
|
return "KeyCapsLock"
|
|
|
|
case KeyComma:
|
|
|
|
return "KeyComma"
|
|
|
|
case KeyDelete:
|
|
|
|
return "KeyDelete"
|
|
|
|
case KeyDown:
|
|
|
|
return "KeyDown"
|
|
|
|
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 KeyGraveAccent:
|
|
|
|
return "KeyGraveAccent"
|
|
|
|
case KeyHome:
|
|
|
|
return "KeyHome"
|
|
|
|
case KeyInsert:
|
|
|
|
return "KeyInsert"
|
|
|
|
case KeyKP0:
|
|
|
|
return "KeyKP0"
|
|
|
|
case KeyKP1:
|
|
|
|
return "KeyKP1"
|
|
|
|
case KeyKP2:
|
|
|
|
return "KeyKP2"
|
|
|
|
case KeyKP3:
|
|
|
|
return "KeyKP3"
|
|
|
|
case KeyKP4:
|
|
|
|
return "KeyKP4"
|
|
|
|
case KeyKP5:
|
|
|
|
return "KeyKP5"
|
|
|
|
case KeyKP6:
|
|
|
|
return "KeyKP6"
|
|
|
|
case KeyKP7:
|
|
|
|
return "KeyKP7"
|
|
|
|
case KeyKP8:
|
|
|
|
return "KeyKP8"
|
|
|
|
case KeyKP9:
|
|
|
|
return "KeyKP9"
|
|
|
|
case KeyKPAdd:
|
|
|
|
return "KeyKPAdd"
|
|
|
|
case KeyKPDecimal:
|
|
|
|
return "KeyKPDecimal"
|
|
|
|
case KeyKPDivide:
|
|
|
|
return "KeyKPDivide"
|
|
|
|
case KeyKPEnter:
|
|
|
|
return "KeyKPEnter"
|
|
|
|
case KeyKPEqual:
|
|
|
|
return "KeyKPEqual"
|
|
|
|
case KeyKPMultiply:
|
|
|
|
return "KeyKPMultiply"
|
|
|
|
case KeyKPSubtract:
|
|
|
|
return "KeyKPSubtract"
|
|
|
|
case KeyLeft:
|
|
|
|
return "KeyLeft"
|
|
|
|
case KeyLeftAlt:
|
|
|
|
return "KeyLeftAlt"
|
|
|
|
case KeyLeftBracket:
|
|
|
|
return "KeyLeftBracket"
|
|
|
|
case KeyLeftControl:
|
|
|
|
return "KeyLeftControl"
|
|
|
|
case KeyLeftShift:
|
|
|
|
return "KeyLeftShift"
|
2020-10-11 11:33:40 +02:00
|
|
|
case KeyLeftSuper:
|
|
|
|
return "KeyLeftSuper"
|
2020-04-21 15:33:18 +02:00
|
|
|
case KeyMenu:
|
|
|
|
return "KeyMenu"
|
|
|
|
case KeyMinus:
|
|
|
|
return "KeyMinus"
|
|
|
|
case KeyNumLock:
|
|
|
|
return "KeyNumLock"
|
|
|
|
case KeyPageDown:
|
|
|
|
return "KeyPageDown"
|
|
|
|
case KeyPageUp:
|
|
|
|
return "KeyPageUp"
|
|
|
|
case KeyPause:
|
|
|
|
return "KeyPause"
|
|
|
|
case KeyPeriod:
|
|
|
|
return "KeyPeriod"
|
|
|
|
case KeyPrintScreen:
|
|
|
|
return "KeyPrintScreen"
|
|
|
|
case KeyRight:
|
|
|
|
return "KeyRight"
|
|
|
|
case KeyRightAlt:
|
|
|
|
return "KeyRightAlt"
|
|
|
|
case KeyRightBracket:
|
|
|
|
return "KeyRightBracket"
|
|
|
|
case KeyRightControl:
|
|
|
|
return "KeyRightControl"
|
|
|
|
case KeyRightShift:
|
|
|
|
return "KeyRightShift"
|
2020-10-11 11:33:40 +02:00
|
|
|
case KeyRightSuper:
|
|
|
|
return "KeyRightSuper"
|
2020-04-21 15:33:18 +02:00
|
|
|
case KeyScrollLock:
|
|
|
|
return "KeyScrollLock"
|
|
|
|
case KeySemicolon:
|
|
|
|
return "KeySemicolon"
|
|
|
|
case KeySlash:
|
|
|
|
return "KeySlash"
|
|
|
|
case KeySpace:
|
|
|
|
return "KeySpace"
|
|
|
|
case KeyTab:
|
|
|
|
return "KeyTab"
|
|
|
|
case KeyUp:
|
|
|
|
return "KeyUp"
|
|
|
|
}
|
2020-04-21 17:32:35 +02:00
|
|
|
panic(fmt.Sprintf("driver: invalid key: %d", k))
|
2020-04-21 15:33:18 +02:00
|
|
|
}
|