The best reference for Win32::Console is the file test.pl that comes with it. Specifically, it has code that demos using the cursor keys.
( Please do not upvote this node. Dave Roth wrote the code, I just remembered where it was!)
Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.
| [reply] |
at least a better idea where to search, to capture the arrow keys in a win32 cmd console?
Who makes and provides the win32 cmd console?
Right, microsoft.
So where should you search?
Right, microsoft.
Remember this advice, if you want to know about product X simply ask the-maker-of-product-X.
microsoft console read arrow key =>
high level console input and output functions <>
low level console input functions
<>
console structures <>
key_event_record_str => Enhanced keys for the IBM® 101- and 102-key keyboards are the INS, DEL, HOME, END, PAGE UP, PAGE DOWN, and direction keys in the clusters to the left of the keypad; and the divide (/) and ENTER keys in the keypad
Now you can reach for Win32::API, or enhance Term::ReadKey or whatever.
update: As far as portability goes, I'd look into Curses.
| MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" | | I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). | | ** The third rule of perl club is a statement of fact: pod is sexy. |
| [reply] |
Check out one of my old nodes about a very similar problem. There are some problems with ReadKey on Windows for certain keys (arrow keys, delete, etc.). Sorry for not being much of a help, but you're not the only one with this problem.
| [reply] |