> Anyone can tell me what is wrong or is there another way to make get_char() return immediately? The tty driver is in cooked mode by default. If you want to read a character at a time, you must turn off cooked mode (i.e. turn on raw mode): You may use the cfmakeraw function to do that. See termios(3) for details. -ch