add comment

This commit is contained in:
Cheney 2015-10-09 11:13:07 +08:00
parent aec0cc08d9
commit 86a7212964
1 changed files with 3 additions and 0 deletions

View File

@ -24,6 +24,8 @@ const (
VK_RCONTROL = 0xA3
)
// RawReader translate input record to ANSI escape sequence.
// To provides same behavior as unix terminal.
type RawReader struct {
ctrlKey bool
altKey bool
@ -34,6 +36,7 @@ func NewRawReader() *RawReader {
return r
}
// only process one action in one read
func (r *RawReader) Read(buf []byte) (int, error) {
ir := new(_INPUT_RECORD)
var read int