forked from mirror/readline
add comment
This commit is contained in:
parent
aec0cc08d9
commit
86a7212964
|
@ -24,6 +24,8 @@ const (
|
||||||
VK_RCONTROL = 0xA3
|
VK_RCONTROL = 0xA3
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// RawReader translate input record to ANSI escape sequence.
|
||||||
|
// To provides same behavior as unix terminal.
|
||||||
type RawReader struct {
|
type RawReader struct {
|
||||||
ctrlKey bool
|
ctrlKey bool
|
||||||
altKey bool
|
altKey bool
|
||||||
|
@ -34,6 +36,7 @@ func NewRawReader() *RawReader {
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// only process one action in one read
|
||||||
func (r *RawReader) Read(buf []byte) (int, error) {
|
func (r *RawReader) Read(buf []byte) (int, error) {
|
||||||
ir := new(_INPUT_RECORD)
|
ir := new(_INPUT_RECORD)
|
||||||
var read int
|
var read int
|
||||||
|
|
Loading…
Reference in New Issue