On Tuesday 28 December 2004 15:12, ram wrote:
Can anyone tell me how to write a getch fucntion using the GETATTR
and SETATTR commands.The functions should be like " when we click
the button the key board should display the button pressed.THis can
be done but what about the escape sequence buttons like uparrow and
down arrow.
This is the wrong list for this question, I'm pretty sure. But, just for
fun, I'm including code that answers your question. The up and down
arrows are shown by a sequence of ascii chars ^[[A ^[[B, etc. etc.
have fun,
--
-jeff