Mar 22, 2004 #1 lmb5kids Programmer Dec 18, 2003 36 US I have a script that I would like the user to be able to press the escape key to exit, how would I go about reading the escape key in a script ? Thanks for any help.
I have a script that I would like the user to be able to press the escape key to exit, how would I go about reading the escape key in a script ? Thanks for any help.
Mar 23, 2004 #2 PHV MIS Nov 8, 2002 53,708 FR You can try put the following lines at the beginning of your scripts: savetty=`stty -g` stty intr '^[' trap 'stty $savetty; exit 0' 0 1 2 3 15 Hope This Help, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 Upvote 0 Downvote
You can try put the following lines at the beginning of your scripts: savetty=`stty -g` stty intr '^[' trap 'stty $savetty; exit 0' 0 1 2 3 15 Hope This Help, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
Mar 23, 2004 #3 aigles Technical User Sep 20, 2001 464 FR Congratulations PH, TipMaster of the Week again . Jean Pierre. Upvote 0 Downvote
Mar 23, 2004 #5 vgersh99 Programmer Jul 27, 2000 2,146 US PHV, congrats! vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
PHV, congrats! vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+