diff --git a/terminal/ansi.go b/terminal/ansi.go index 17c76eb..e5cb6f0 100644 --- a/terminal/ansi.go +++ b/terminal/ansi.go @@ -10,6 +10,11 @@ const HideCursor = "\x1b[?25l" const ShowCursor = "\x1b[?25h" 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 { return fmt.Sprintf("\x1b[%s", s) }