There is no standard way of replicating kbhit, getch, etc as the standard input functions are buffered and block while waiting on user input.
I remember reading an article somewhere where buffering could be turned off, but it's not portable. Try milling over the results from
google and see if any will work for your situation.
Good luck