-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2004-07-01, justme <> wrote:
> i want to catch from the keyboard. I have looked at perldoc -q signal
perldoc -q signal talks about trapping signals, not catching keystrokes.
> $Interrupted = 0; # to ensure it has a value
> $SIG{INT} = sub {
> $Interrupted++;
> syswrite(STDERR, "ouch\n", 5);
> }
>
> Does this example catch Ctrl-x?
No, it traps SIGINT, which is commonly sent by ctrl-c. IIRC ctrl-x
doesn't normally send a signal, so you can't trap it this way.
Why don't you describe your goal, rather than trying to describe what
you think you want to do? Why are you so concerned with ctrl-x?
- --keith
- --
kkeller-
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQFA44FhhVcNCxZ5ID8RAgSfAJwOszJpruEcvk6lD6kgMq SVhWotjwCgjq6C
Ro02Dl1lGYWpTt+NrFDzCAE=
=EM95
-----END PGP SIGNATURE-----