gilo/editor/keymap.go

30 lines
717 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 = '↑'
keyDown = '↓'
keyLeft = '←'
keyRight = '→'
)
var keyMap = map[string]rune{
KeyArrowUp: keyUp,
KeyArrowDown: keyDown,
KeyArrowLeft: keyLeft,
KeyArrowRight: keyRight,
}