Add arrow key escape sequences
This commit is contained in:
parent
ebf6b38a97
commit
fdb34d8533
@ -10,6 +10,11 @@ const HideCursor = "\x1b[?25l"
|
|||||||
const ShowCursor = "\x1b[?25h"
|
const ShowCursor = "\x1b[?25h"
|
||||||
const ResetCursor = "\x1b[H"
|
const ResetCursor = "\x1b[H"
|
||||||
|
|
||||||
|
const KeyArrowUp = "\x1b[A"
|
||||||
|
const KeyArrowDown = "\x1b[B"
|
||||||
|
const KeyArrowRight = "\x1b[C"
|
||||||
|
const KeyArrowLeft = "\x1b[D"
|
||||||
|
|
||||||
func Code (s string) string {
|
func Code (s string) string {
|
||||||
return fmt.Sprintf("\x1b[%s", s)
|
return fmt.Sprintf("\x1b[%s", s)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user