key_unix.go 732 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Copyright 2013 Jonas mg
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this
  5. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6. // +build !plan9,!windows
  7. package sys
  8. // Key codes
  9. const (
  10. K_TAB = 0x09 // TAB key
  11. K_BACK = 0x7F // BACKSPACE key
  12. K_RETURN = 0x0D // RETURN key
  13. K_ESCAPE = 0x1B // ESC key
  14. )
  15. // Control+letters key codes.
  16. const (
  17. K_CTRL_A = iota + 0x01
  18. K_CTRL_B
  19. K_CTRL_C
  20. K_CTRL_D
  21. K_CTRL_E
  22. K_CTRL_F
  23. K_CTRL_G
  24. K_CTRL_H
  25. K_CTRL_I
  26. K_CTRL_J
  27. K_CTRL_K
  28. K_CTRL_L
  29. K_CTRL_M
  30. K_CTRL_N
  31. K_CTRL_O
  32. K_CTRL_P
  33. K_CTRL_Q
  34. K_CTRL_R
  35. K_CTRL_S
  36. K_CTRL_T
  37. K_CTRL_U
  38. K_CTRL_V
  39. K_CTRL_W
  40. K_CTRL_X
  41. K_CTRL_Y
  42. K_CTRL_Z
  43. )