Skip to content
Myr

Don't expose ReadInput

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent c0f67a2 · Browse files · 2 files+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−3 removed

  • other:+3 added−3 removed

2 files+3 added−3 removed

modified:key.go+2 added-2 removed
260 unmodified lines
261 "1b5b313b3343": {Type: KeyRight, Alt: true},262 "1b5b313b3344": {Type: KeyLeft, Alt: true},263}264265// ReadInput reads keypress and mouse input from a TTY and returns a message265// readInput reads keypress and mouse input from a TTY and returns a message266// containing information about the key or mouse event accordingly267func ReadInput(r io.Reader) (Msg, error) {267func readInput(r io.Reader) (Msg, error) {268 var buf [256]byte269270 // Read and block271 numBytes, err := r.Read(buf[:])
49 unmodified lines
modified:tea.go+1 added-1 removed
131 unmodified lines
132133 // Subscribe to user input134 go func() {135 for {136 msg, err := ReadInput(os.Stdin)136 msg, err := readInput(os.Stdin)137 if err != nil {138 errs <- err139 }140 msgs <- msg
124 unmodified lines