forked from c-bata/go-prompt
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkey_string.go
112 lines (106 loc) · 3.21 KB
/
key_string.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Code generated by "stringer -type=Key"; DO NOT EDIT.
package prompt
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[Escape-0]
_ = x[ControlA-1]
_ = x[ControlB-2]
_ = x[ControlC-3]
_ = x[ControlD-4]
_ = x[ControlE-5]
_ = x[ControlF-6]
_ = x[ControlG-7]
_ = x[ControlH-8]
_ = x[ControlI-9]
_ = x[ControlJ-10]
_ = x[ControlK-11]
_ = x[ControlL-12]
_ = x[ControlM-13]
_ = x[ControlN-14]
_ = x[ControlO-15]
_ = x[ControlP-16]
_ = x[ControlQ-17]
_ = x[ControlR-18]
_ = x[ControlS-19]
_ = x[ControlT-20]
_ = x[ControlU-21]
_ = x[ControlV-22]
_ = x[ControlW-23]
_ = x[ControlX-24]
_ = x[ControlY-25]
_ = x[ControlZ-26]
_ = x[ControlSpace-27]
_ = x[ControlBackslash-28]
_ = x[ControlSquareClose-29]
_ = x[ControlCircumflex-30]
_ = x[ControlUnderscore-31]
_ = x[ControlLeft-32]
_ = x[ControlRight-33]
_ = x[ControlUp-34]
_ = x[ControlDown-35]
_ = x[Up-36]
_ = x[Down-37]
_ = x[Right-38]
_ = x[AltRight-39]
_ = x[Left-40]
_ = x[AltLeft-41]
_ = x[ShiftLeft-42]
_ = x[ShiftUp-43]
_ = x[ShiftDown-44]
_ = x[ShiftRight-45]
_ = x[Home-46]
_ = x[End-47]
_ = x[Delete-48]
_ = x[ShiftDelete-49]
_ = x[ControlDelete-50]
_ = x[PageUp-51]
_ = x[PageDown-52]
_ = x[BackTab-53]
_ = x[Insert-54]
_ = x[Backspace-55]
_ = x[AltBackspace-56]
_ = x[Tab-57]
_ = x[Enter-58]
_ = x[F1-59]
_ = x[F2-60]
_ = x[F3-61]
_ = x[F4-62]
_ = x[F5-63]
_ = x[F6-64]
_ = x[F7-65]
_ = x[F8-66]
_ = x[F9-67]
_ = x[F10-68]
_ = x[F11-69]
_ = x[F12-70]
_ = x[F13-71]
_ = x[F14-72]
_ = x[F15-73]
_ = x[F16-74]
_ = x[F17-75]
_ = x[F18-76]
_ = x[F19-77]
_ = x[F20-78]
_ = x[F21-79]
_ = x[F22-80]
_ = x[F23-81]
_ = x[F24-82]
_ = x[Any-83]
_ = x[CPRResponse-84]
_ = x[Vt100MouseEvent-85]
_ = x[WindowsMouseEvent-86]
_ = x[BracketedPaste-87]
_ = x[Ignore-88]
_ = x[NotDefined-89]
}
const _Key_name = "EscapeControlAControlBControlCControlDControlEControlFControlGControlHControlIControlJControlKControlLControlMControlNControlOControlPControlQControlRControlSControlTControlUControlVControlWControlXControlYControlZControlSpaceControlBackslashControlSquareCloseControlCircumflexControlUnderscoreControlLeftControlRightControlUpControlDownUpDownRightAltRightLeftAltLeftShiftLeftShiftUpShiftDownShiftRightHomeEndDeleteShiftDeleteControlDeletePageUpPageDownBackTabInsertBackspaceAltBackspaceTabEnterF1F2F3F4F5F6F7F8F9F10F11F12F13F14F15F16F17F18F19F20F21F22F23F24AnyCPRResponseVt100MouseEventWindowsMouseEventBracketedPasteIgnoreNotDefined"
var _Key_index = [...]uint16{0, 6, 14, 22, 30, 38, 46, 54, 62, 70, 78, 86, 94, 102, 110, 118, 126, 134, 142, 150, 158, 166, 174, 182, 190, 198, 206, 214, 226, 242, 260, 277, 294, 305, 317, 326, 337, 339, 343, 348, 356, 360, 367, 376, 383, 392, 402, 406, 409, 415, 426, 439, 445, 453, 460, 466, 475, 487, 490, 495, 497, 499, 501, 503, 505, 507, 509, 511, 513, 516, 519, 522, 525, 528, 531, 534, 537, 540, 543, 546, 549, 552, 555, 558, 561, 572, 587, 604, 618, 624, 634}
func (i Key) String() string {
if i < 0 || i >= Key(len(_Key_index)-1) {
return "Key(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Key_name[_Key_index[i]:_Key_index[i+1]]
}