-
cursor
Can anyone help me on how can I use a cursor in linux programming in C, what I want to do is move the cursor with the keyboard arrows and as I move the cursor to different options everytime I move the cursor the textcolor of the option will be highlighted and when the cursor changes the prevous option color will loose contrast.
-
Start with
#include <curses.h>
then use functions like :
initscr();
noecho();
cbreak();
keypad(stdscr,1);
to get "control" of the console
then getch(); to get the keystroke from the user, check to see if it corresponds to the "Left-Key's" numeric value then do whatever you like with it.
p.s.
u might have to compile with -lcurses
p.s.s.
this should have been posted in the Linux section