Command keyprobe prints what the terminal sends for each key, in raw mode.
It settles questions about a terminal's key encoding - whether Ctrl+Enter reaches
the program as a sequence of its own, whether Shift+Enter differs from Enter, what
an arrow key looks like - without guessing from documentation: run it in the
terminal, press the keys, read the bytes.
go run ./scripts/keyprobe
Ctrl+C or Ctrl+D leaves it. Everything after that is printed as hex and as a
quoted string, so a terminal that sends a control byte, an escape sequence or a
Windows Terminal win32-input-mode record is all readable at a glance.