stty -echo disable the echo of your terminal, but if you type something, it will be memorized and the shell will get the typed key.
 Then, before leaving, stty echo (revert back the echo mode), and drain the terminal input with this program :
#include <stdio.h>
#include <unistd.h>
#include <termios.h>
int main(void)
{
    tcflush(0, TCIFLUSH);
    return 0;
}
 The whole thing would be stty raw -echo;sleep 10;stty sane;./my_program.
Using raw, avoid CtrlC CtrlZ to interfere. Sane imply echo and revert the terminal to a sane mode.