key.go 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. // Code generated by hand; DO NOT EDIT.
  2. // This is a little bit stupid, but there are many public constants which is no value for writing godoc comment.
  3. package prompt
  4. // Key is the type express the key inserted from user.
  5. //go:generate stringer -type=Key
  6. type Key int
  7. // ASCIICode is the type contains Key and it's ascii byte array.
  8. type ASCIICode struct {
  9. Key Key
  10. ASCIICode []byte
  11. }
  12. const (
  13. Escape Key = iota
  14. ControlA
  15. ControlB
  16. ControlC
  17. ControlD
  18. ControlE
  19. ControlF
  20. ControlG
  21. ControlH
  22. ControlI
  23. ControlJ
  24. ControlK
  25. ControlL
  26. ControlM
  27. ControlN
  28. ControlO
  29. ControlP
  30. ControlQ
  31. ControlR
  32. ControlS
  33. ControlT
  34. ControlU
  35. ControlV
  36. ControlW
  37. ControlX
  38. ControlY
  39. ControlZ
  40. ControlSpace
  41. ControlBackslash
  42. ControlSquareClose
  43. ControlCircumflex
  44. ControlUnderscore
  45. ControlLeft
  46. ControlRight
  47. ControlUp
  48. ControlDown
  49. Up
  50. Down
  51. Right
  52. Left
  53. ShiftLeft
  54. ShiftUp
  55. ShiftDown
  56. ShiftRight
  57. Home
  58. End
  59. Delete
  60. ShiftDelete
  61. ControlDelete
  62. PageUp
  63. PageDown
  64. BackTab
  65. Insert
  66. Backspace
  67. // Aliases.
  68. Tab
  69. Enter
  70. // Actually Enter equals ControlM, not ControlJ,
  71. // However, in prompt_toolkit, we made the mistake of translating
  72. // \r into \n during the input, so everyone is now handling the
  73. // enter key by binding ControlJ.
  74. // From now on, it's better to bind `ASCII_SEQUENCES.Enter` everywhere,
  75. // because that's future compatible, and will still work when we
  76. // stop replacing \r by \n.
  77. F1
  78. F2
  79. F3
  80. F4
  81. F5
  82. F6
  83. F7
  84. F8
  85. F9
  86. F10
  87. F11
  88. F12
  89. F13
  90. F14
  91. F15
  92. F16
  93. F17
  94. F18
  95. F19
  96. F20
  97. F21
  98. F22
  99. F23
  100. F24
  101. // Matches any key.
  102. Any
  103. // Special
  104. CPRResponse
  105. Vt100MouseEvent
  106. WindowsMouseEvent
  107. BracketedPaste
  108. // Key which is ignored. (The key binding for this key should not do anything.)
  109. Ignore
  110. // Key is not defined
  111. NotDefined
  112. )