PDA

View Full Version : Arrow and function keys



Skarr
02-05-2003, 02:48 AM
Is there a way for me to check for arrow/function keys from user input. (ncurses?).

Thanks
Skarr

Fredd
02-05-2003, 10:49 AM
Yes, there is a way with ncurses.


keypad(stdscr, TRUE)

after that you can use KEY_UP for up arrow KEY_DOWN for down, etc.
for function keys I think it is KEY_F(n) not sure though.

more info: man keypad.
and/or
http://en.tldp.org/HOWTO/NCURSES-Programming-HOWTO/

Skarr
02-05-2003, 01:03 PM
Uh, how do I check for the escape key?