23 lines
591 B
Go
23 lines
591 B
Go
package input
|
|
|
|
// Key is a platform-neutral physical key identifier. Terminal and raylib
|
|
// frontends translate native key events to Key before consulting KeyMap.
|
|
// Android/gomobile bypasses this package: Kotlin translates touch/gesture
|
|
// input to game.Action directly
|
|
type Key uint8
|
|
|
|
const (
|
|
KeyNone Key = iota
|
|
KeyH // MoveLeft
|
|
KeyJ // MoveDown
|
|
KeyK // MoveUp
|
|
KeyL // MoveRight
|
|
KeySemicolon // stub
|
|
KeyA // stub
|
|
KeyS // stub
|
|
KeyD // stub
|
|
KeyF // stub
|
|
KeySpace
|
|
KeyEnter
|
|
)
|