@b0rk that reminds me, I found the first few parts of this tutorial really helpful for understanding what an interactive terminal program has to do to correctly handle input and output, and what input such programs observe when you interact with the terminal: https://viewsourcecode.org/snaptoken/kilo/