sequences.go 617 B

123456789101112131415161718192021222324252627282930
  1. package terminal
  2. import (
  3. "fmt"
  4. "io"
  5. )
  6. const (
  7. KeyArrowLeft = '\x02'
  8. KeyArrowRight = '\x06'
  9. KeyArrowUp = '\x10'
  10. KeyArrowDown = '\x0e'
  11. KeySpace = ' '
  12. KeyEnter = '\r'
  13. KeyBackspace = '\b'
  14. KeyDelete = '\x7f'
  15. KeyInterrupt = '\x03'
  16. KeyEndTransmission = '\x04'
  17. KeyEscape = '\x1b'
  18. KeyDeleteWord = '\x17' // Ctrl+W
  19. KeyDeleteLine = '\x18' // Ctrl+X
  20. SpecialKeyHome = '\x01'
  21. SpecialKeyEnd = '\x11'
  22. SpecialKeyDelete = '\x12'
  23. IgnoreKey = '\000'
  24. )
  25. func soundBell(out io.Writer) {
  26. fmt.Fprint(out, "\a")
  27. }