I need to wait for a key, 'n', then continue. No echo of character. You don't have to press enter.

#read -n 1 -s -r
This works in bash. If I try using the 'system' function, I get a keyboard freeze, but no key will continue.


system("read -n 1 -s -r");

How to make this work? Else, some other way to wait for a keypress in C.