You may have a look at the
ncurses[
^] library. If that can't be used you can implement a
kbhit
function that checks if a key has been pressed and use the
getch
function from my answer to your previous question to read the pressed key. Examples for the
kbhit
function with Linux can be found when searching for 'linux kbhit'.