|Pathologically Eclectic Rubbish Lister|
Re: How to ReadKey on those weird ones...by Aighearach
|on Jul 09, 2000 at 18:27 UTC||Need Help??|
You can use to Term::ReadKey to read raw keystrokes. The follow code prints out an interger value coresponding to each keystroke. While it doesn't let you check the conrol keys without another key, it does let you tell the difference between control+key, and alt+key, or to detect the arrow keys.
The following code tested under linux. If you are using another platform, be sure to RTM first.
Note also that if you run this code, you will have to kill the process remotely. If that doesn't make any sense, change ReadMode before you run it.
update: have you tried rebuilding and/or reinstalling Term::ReadKey? It is a very important module, I would focus on getting it to work instead of replacing it.
Is it any call to ReadMode that crashes?
If you install via perl -MCPAN -e'shell' then it will do a number of tests as it installs.
Paris Sinclair | 4a75737420416e6f74686572 firstname.lastname@example.org | 205065726c204861636b6572 I wear my Geek Code on my finger.