in reply to Is it possible in perl to detect keyboard events like as "when keydown"

I used to do it by hand using an ancient method from perlfaq5 (ish). These days, I use Term::ReadKey to read a single key.

It appears the really ancient version has been replaced with a more modern version and below it is the Term::ReadKey I just suggested. Obviously someone is keeping these documents up to date.

Hopefully few remember forking to /usr/bin/stty to enter passwords.

UPDATE: I just realized you specifically asked for keyboard events. You might find a POE module that generates events on keystrokes, but I'm not sure which would be best. I have used various Wheels and Server modules. POE is fun.

-Paul

  • Comment on Re: Is it possible in perl to detect keyboard events like as "when keydown"