gilo/editor/keymap.go
Timothy Warren 458f94f576 Break stuff
2021-03-26 12:01:17 -04:00

30 lines
746 B
Go

package editor
// ----------------------------------------------------------------------------
// !Terminal Input Escape Code Sequences
// ----------------------------------------------------------------------------
const(
KeyArrowUp = "A"
KeyArrowDown = "B"
KeyArrowRight = "C"
KeyArrowLeft = "D"
)
// ----------------------------------------------------------------------------
// !Map escape sequences to simpler constants
// ----------------------------------------------------------------------------
const (
keyUp = "ARROW_UP"
keyDown = "ARROW_DOWN"
keyLeft = "ARROW_LEFT"
keyRight = "ARROW_RIGHT"
)
var keyMap = map[string]string{
KeyArrowUp: keyUp,
KeyArrowDown: keyDown,
KeyArrowLeft: keyLeft,
KeyArrowRight: keyRight,
}