Capturing the UP Arrow Key
Dear all,
Background: Rabbit Microcontroller.
Accessing the board via Telnet. TCP/IP
Uses VT100 Emulation Telnet.
I had been thinking how do I check whether a user had keyed in an UP ARROW and bring up his previously entered command. I tried to do a HEX key capture and they returned me 3 HEX numbers.
I am using a Switch Case, I can't combine these 3 HEX codes together and match the UP ARROW as one case.
Each of my character is received from a buffer and not captured as an input string stream.
Meaning, one char by one char it goes into a char variable read from the buffer.
HEX KEY for UP arrow is 1b 5b 41
I checked up the net and they gave me 1E as UP ARROW but funny thing is it can't work!
Examples:
(Can't work)
case '\x1E':
do somthing...
break;
(Compile error)
switch(ch)
{
case '\x1b\x5b\x41'
Do something
}
thanks for reading. I am using Dynamic C compiler, its not those normal ANSI compiler I guess. Its from the microcontroller manufacturer www.rabbit.com
HEX KEY for UP arrow is 1b 5b 41
Thanks so much! I will give it a try...