Get a single character from the keyboard buffer with echo. If there is no key pressed in the keyboard buffer then the function waits for the user to press a key.