[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-Toolbox] Re: [MacPerl] Capturing keystrokes with Mac::Windows and Mac::Events



>> 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?

-- PGP Signed/Encrypted Email Preferred : 0xA0CE4746 --
Jeremy Derr             derr@ausa.net / derr@holdit.com
"If there is no God, who pops up
 the next kleenex in the box?"  -- Art Hoppe

http://www.ausaweb.com/~derr/


==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-toolbox-request@macperl.org