GUI libraries make it a breaze to handle. It depends on what Operating System your on. For example, in linux you can easily use NCurses to do this. Or depending on your OS too, you can use termios or msvcrt