Simple things can be complex:
Reading a single key event from the keyboard is quite hard. Standard C and OS settings
will buffer key events until a line is complete #LDISC.
And special keys like arrows or ESC have native non-standard encodings like VKEY on #Windows, #VT100 escape codes on #POSIX, AKEYCODE on #Android, multibyte codes from the #BIOS layer or scan codes from #UEFI or the hardware.
But it's fun to learn about what's really going on beyond libraries like `ncurses`.
#ldisc #windows #vt100 #posix #android #bios #uefi