ebiten/keys.go

95 lines
2.9 KiB
Go
Raw Normal View History

2015-01-06 18:25:26 +01:00
// Copyright 2015 Hajime Hoshi
//
// 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.
2014-12-14 08:53:32 +01:00
package ebiten
2015-01-01 17:20:20 +01:00
import (
"github.com/hajimehoshi/ebiten/internal/ui"
)
2014-12-14 14:05:44 +01:00
// A Key represents a keyboard key.
2014-12-14 08:53:32 +01:00
type Key int
2014-12-14 14:05:44 +01:00
// Keys
2014-12-14 08:53:32 +01:00
const (
2015-01-06 18:25:26 +01:00
Key0 = Key(ui.Key0)
Key1 = Key(ui.Key1)
Key2 = Key(ui.Key2)
Key3 = Key(ui.Key3)
Key4 = Key(ui.Key4)
Key5 = Key(ui.Key5)
Key6 = Key(ui.Key6)
Key7 = Key(ui.Key7)
Key8 = Key(ui.Key8)
Key9 = Key(ui.Key9)
KeyA = Key(ui.KeyA)
KeyB = Key(ui.KeyB)
KeyC = Key(ui.KeyC)
KeyCapsLock = Key(ui.KeyCapsLock)
KeyComma = Key(ui.KeyComma)
KeyD = Key(ui.KeyD)
KeyDelete = Key(ui.KeyDelete)
KeyDown = Key(ui.KeyDown)
KeyE = Key(ui.KeyE)
KeyEnd = Key(ui.KeyEnd)
KeyEnter = Key(ui.KeyEnter)
KeyEscape = Key(ui.KeyEscape)
KeyF = Key(ui.KeyF)
KeyF1 = Key(ui.KeyF1)
KeyF10 = Key(ui.KeyF10)
KeyF11 = Key(ui.KeyF11)
KeyF12 = Key(ui.KeyF12)
KeyF2 = Key(ui.KeyF2)
KeyF3 = Key(ui.KeyF3)
KeyF4 = Key(ui.KeyF4)
KeyF5 = Key(ui.KeyF5)
KeyF6 = Key(ui.KeyF6)
KeyF7 = Key(ui.KeyF7)
KeyF8 = Key(ui.KeyF8)
KeyF9 = Key(ui.KeyF9)
KeyG = Key(ui.KeyG)
KeyH = Key(ui.KeyH)
KeyHome = Key(ui.KeyHome)
KeyI = Key(ui.KeyI)
KeyInsert = Key(ui.KeyInsert)
KeyJ = Key(ui.KeyJ)
KeyK = Key(ui.KeyK)
KeyL = Key(ui.KeyL)
KeyLeft = Key(ui.KeyLeft)
KeyLeftAlt = Key(ui.KeyLeftAlt)
KeyLeftControl = Key(ui.KeyLeftControl)
KeyLeftShift = Key(ui.KeyLeftShift)
KeyM = Key(ui.KeyM)
KeyN = Key(ui.KeyN)
KeyO = Key(ui.KeyO)
KeyP = Key(ui.KeyP)
KeyPageDown = Key(ui.KeyPageDown)
KeyPageUp = Key(ui.KeyPageUp)
KeyPeriod = Key(ui.KeyPeriod)
KeyQ = Key(ui.KeyQ)
KeyR = Key(ui.KeyR)
KeyRight = Key(ui.KeyRight)
KeyS = Key(ui.KeyS)
KeySpace = Key(ui.KeySpace)
KeyT = Key(ui.KeyT)
KeyTab = Key(ui.KeyTab)
KeyU = Key(ui.KeyU)
KeyUp = Key(ui.KeyUp)
KeyV = Key(ui.KeyV)
KeyW = Key(ui.KeyW)
KeyX = Key(ui.KeyX)
KeyY = Key(ui.KeyY)
KeyZ = Key(ui.KeyZ)
2014-12-14 08:53:32 +01:00
)