...

Source file src/github.com/c-bata/go-prompt/key.go

Documentation: github.com/c-bata/go-prompt

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

View as plain text