Here's a summary of issue #90:
Problem: The keyboard channel in the generated entry harness reads from os.Stdin via bufio.NewReader, which operates in the terminal's default cooked/line-buffered mode. Characters aren't delivered until the user presses Enter, so programs like echoing.occ (which expect character-by-character input) don't work correctly — you type several keys with no echo, then everything appears at once after Enter.
Current code (codegen/codegen.go:482-498): The keyboard reader goroutine just does bufio.NewReader(os.Stdin).ReadByte() in a loop.
Fix needed: Switch the terminal to raw mode so bytes are available immediately as typed. The standard approach in Go is golang.org/x/term:
- term.MakeRaw(int(os.Stdin.Fd())) to enter raw mode
- term.Restore(...) on cleanup to restore the original terminal state
- Read directly from os.Stdin (no buffering needed in raw mode)
This would also require handling Ctrl+C manually (raw mode disables signal generation) and ensuring terminal state is always restored, even on panic.
Would you like me to implement this fix?