reg getch() function

Jeff Pitman symbiont at berlios.de
Tue Dec 28 07:27:47 UTC 2004


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keys.c
Type: text/x-csrc
Size: 822 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20041228/34824270/attachment-0002.bin 


More information about the devel mailing list