in reply to a ReadKey problem

Do you get the whole string of the pressed key at once, like: \e\UP_ARROW_CODE? If so, you can trim the \e code and put the rest in the hash. If you get a single \e - this is your escape key, you can put it in the hash too. Can't you solve your problem with regexps?

Replies are listed 'Best First'.
Re: Re: a ReadKey problem
by Pardus (Pilgrim) on Jan 28, 2003 at 10:56 UTC
    No I get the escape sequence as single chars, one by one. Once I've decided it is an escape sequence I read in the complete sequence (once again using time-outs) and look up this string in a hash.

    But the problem are the time-outs, the time-outs are unrelyable and I would like to get rid of them.
    --
    Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org>
    >>>> Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<