Re: Is it possible to catch Ctrl-C keystroke?



On Jun 27, 8:41 pm, "palm...@xxxxxxxxx" <palm...@xxxxxxxxx> wrote:
On Jun 28, 3:26 am, Victor <vhnguy...@xxxxxxxxx> wrote:

Hi,

While running a TCL script, if someone hits Ctrl-C, does anyone know
if there is a way to capture such Ctrl-C character (so my script can
do some minimum cleanup job first before quitting)?

Thanks,
Victor

What platform?

On unix for sure you can use the Tclx extension to handle the SIGINT
signal that results from a Ctrl-C.
I also remember someone created a signals extension; google that. You
can also use Expect extension to
catch input from user ( interact ) using \003 as the regexp .

Carl
.