From 86a7212964c02ca6bd4db6519d2aec881f890bba Mon Sep 17 00:00:00 2001 From: Cheney Date: Fri, 9 Oct 2015 11:13:07 +0800 Subject: [PATCH] add comment --- rawreader_windows.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rawreader_windows.go b/rawreader_windows.go index 5e7b873..073ef15 100644 --- a/rawreader_windows.go +++ b/rawreader_windows.go @@ -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