If your linux has no conio.h
that supports kbhit()
you can look here for Morgan Mattews’s code to provide kbhit()
functionality in a way compatible with any POSIX compliant system.
As the trick desactivate buffering at termios level, it should also solve the getchar()
issue as demonstrated here.