From: Thomas Aaron Date: 2006-11-29T08:23:48+09:00 Subject: Re: Trapping keystrokes > That doesn't exist. The reason is that it is terribly os-dependent. > That's why you need all the curses blunder, and even this is not > satisfying, as it won't run under win32. > > Sorry... > > Vince Ahhh! That makes sense. I'm sure that's why Python doesn't have it as well. Thanks, Vince. In case anyone else stumbles across this post in search of something similar, below is a script that I figured out for detecting keystrokes in BASH. I think it will fit my purposes and may hep someone else, too. #!/bin/bash # Capture keystrokes without needing to press ENTER. old_tty_setting=$(stty -g) # Save old terminal settings. stty -icanon -echo # Disable canonical mode and echo keys=$(dd bs=1 count=1 2> /dev/null) echo you pressed $keys stty "$old_tty_setting" # Restore old terminal settings. exit 0 With a little research, you can create a menu-driven, keystroke-detecting program. -- Posted via http://www.ruby-forum.com/.