in reply to Re^5: Regex arrow key problem
in thread Regex arrow key problem

My source must have been incorrect then. What is, or is there, the code for left and right arrow keys?

Replies are listed 'Best First'.
Re^7: Regex arrow key problem
by ikegami (Patriarch) on Dec 01, 2010 at 20:58 UTC

    According to others in this thread, it's

    "\e", then "[", then "D" ==eq==> "\x1B", "\x5B", "\x44" "\e", then "[", then "C" ==eq==> "\x1B", "\x5B", "\x45"

    (Each of the three values are returned by different calls to ReadKey.)

    Based on what you said you have,

    "\e[D\n" ==eq==> "\x1B\x5B\x44\x0A" "\e[C\n" ==eq==> "\x1B\x5B\x45\x0A"

    Update: Fixed first half.