i'm beating on a dead horse now
anyway, went to refresh on using termios (and learn more on how it works, ofc
)
short story;
in non-canonical mode if VMIN=0 and VTIME=0 then read(stdin) will return immediately even without input
VMIN means minimum characters to return (bytes probably, since utf8 can be multibyte)
VTIME is how many deciseconds to wait for input if there is none already (decisecond = 100ms)
if O_NONBLOCK is set on the file descriptor then VMIN and VTIME are ignored
note that termios has to be restored when exiting since it changes how the actual terminal behaves
on the how to use it,
this is very much commented