Re: Is it possible to catch Ctrl-C keystroke?
- From: "Donal K. Fellows" <donal.k.fellows@xxxxxxxxx>
- Date: Sat, 28 Jun 2008 15:42:56 -0700 (PDT)
Bezoar wrote:
You can also use Expect extension to
catch input from user ( interact ) using \003 as the regexp .
You only get Ctrl-C as \003 if you put the terminal in raw mode. If
you don't, it is converted to a signal before it gets to Tcl. (OK,
strictly you could also reconfigure the terminal to make another
character be the INTR sequence. But that's just moving the problem
around. But that's really just scraping the surface of Unix terminals,
and is probably more than you want to know.) Since the original
question related to cleaning up on exit, signals are absolutely the
right way to do it.
Donal.
.
- References:
- Is it possible to catch Ctrl-C keystroke?
- From: Victor
- Re: Is it possible to catch Ctrl-C keystroke?
- From: palmtcl@xxxxxxxxx
- Re: Is it possible to catch Ctrl-C keystroke?
- From: Bezoar
- Is it possible to catch Ctrl-C keystroke?
- Prev by Date: Re: ISO "anecdotal evidence"
- Next by Date: Tcl question
- Previous by thread: Re: Is it possible to catch Ctrl-C keystroke?
- Next by thread: www.firstnikeshoes.com paypaldunkdunksbdunkjordansumberclothing
- Index(es):
Relevant Pages
|