At 09.14 -0400 1999.04.27, Jeremy Derr wrote: >>> Hi. I'd like to know how to find out what key was pressed from a key event >>> handler, as in >>> >>> $win->sethook('key' => \&key_press); >> >> >> sub key_press { >> my $key = chr $_[1]; >> >> print "You typed $key.\n"; >> } >> >> [Crossposted and Reply-To set to macperl-toolbox list.] > >Will this code deal with a keypress when one occurs, and not hold up the >script while waiting for a press? Right, it sets a hook, which is only called when a key event is detected. It doesn't hold anything up. See the examples in :t:Mac: and in the GUI chapter of the MacPerl book. -- Chris Nandor mailto:pudge@pobox.com http://pudge.net/ %PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6']) ==== Want to unsubscribe from this list? ==== Send mail with body "unsubscribe" to macperl-toolbox-request@macperl.org