2015-01-06 18:25:26 +01:00
|
|
|
// Copyright 2015 Hajime Hoshi
|
2014-12-24 03:04:10 +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.
|
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)
|
2015-01-07 03:00:15 +01:00
|
|
|
KeyD = Key(ui.KeyD)
|
|
|
|
KeyE = Key(ui.KeyE)
|
|
|
|
KeyF = Key(ui.KeyF)
|
|
|
|
KeyG = Key(ui.KeyG)
|
|
|
|
KeyH = Key(ui.KeyH)
|
|
|
|
KeyI = Key(ui.KeyI)
|
|
|
|
KeyJ = Key(ui.KeyJ)
|
|
|
|
KeyK = Key(ui.KeyK)
|
|
|
|
KeyL = Key(ui.KeyL)
|
|
|
|
KeyM = Key(ui.KeyM)
|
|
|
|
KeyN = Key(ui.KeyN)
|
|
|
|
KeyO = Key(ui.KeyO)
|
|
|
|
KeyP = Key(ui.KeyP)
|
|
|
|
KeyQ = Key(ui.KeyQ)
|
|
|
|
KeyR = Key(ui.KeyR)
|
|
|
|
KeyS = Key(ui.KeyS)
|
|
|
|
KeyT = Key(ui.KeyT)
|
|
|
|
KeyU = Key(ui.KeyU)
|
|
|
|
KeyV = Key(ui.KeyV)
|
|
|
|
KeyW = Key(ui.KeyW)
|
|
|
|
KeyX = Key(ui.KeyX)
|
|
|
|
KeyY = Key(ui.KeyY)
|
|
|
|
KeyZ = Key(ui.KeyZ)
|
2015-01-06 18:25:26 +01:00
|
|
|
KeyCapsLock = Key(ui.KeyCapsLock)
|
|
|
|
KeyComma = Key(ui.KeyComma)
|
|
|
|
KeyDelete = Key(ui.KeyDelete)
|
|
|
|
KeyDown = Key(ui.KeyDown)
|
|
|
|
KeyEnd = Key(ui.KeyEnd)
|
|
|
|
KeyEnter = Key(ui.KeyEnter)
|
|
|
|
KeyEscape = Key(ui.KeyEscape)
|
|
|
|
KeyF1 = Key(ui.KeyF1)
|
|
|
|
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)
|
2015-01-07 03:00:15 +01:00
|
|
|
KeyF10 = Key(ui.KeyF10)
|
|
|
|
KeyF11 = Key(ui.KeyF11)
|
|
|
|
KeyF12 = Key(ui.KeyF12)
|
2015-01-06 18:25:26 +01:00
|
|
|
KeyHome = Key(ui.KeyHome)
|
|
|
|
KeyInsert = Key(ui.KeyInsert)
|
|
|
|
KeyLeft = Key(ui.KeyLeft)
|
|
|
|
KeyLeftAlt = Key(ui.KeyLeftAlt)
|
|
|
|
KeyLeftControl = Key(ui.KeyLeftControl)
|
|
|
|
KeyLeftShift = Key(ui.KeyLeftShift)
|
|
|
|
KeyPageDown = Key(ui.KeyPageDown)
|
|
|
|
KeyPageUp = Key(ui.KeyPageUp)
|
|
|
|
KeyPeriod = Key(ui.KeyPeriod)
|
|
|
|
KeyRight = Key(ui.KeyRight)
|
|
|
|
KeySpace = Key(ui.KeySpace)
|
|
|
|
KeyTab = Key(ui.KeyTab)
|
|
|
|
KeyUp = Key(ui.KeyUp)
|
2014-12-14 08:53:32 +01:00
|
|
|
)
|