Hi
I know I:m not
supposed to write this question in this group. I placed same question on other
groups I did not get any help could some body helpme on the problem i;m working
on.
I want to capture
the mouse and keyboard events from C program. I'm using NCURSES to program.
Keyboard events are working fine but program is not receiving the event
KEY_MOUSE though i called neceessary functions.
Here is my code
snippet. Please help me .
menu_win =
newwin(HEIGHT, WIDTH, starty,
startx);
print_menu(menu_win, 1);
/* Get all the mouse events */
state = mousemask(ALL_MOUSE_EVENTS, NULL);
wmouse_trafo(menu_win, 0, 0,TRUE);
print_menu(menu_win, 1);
/* Get all the mouse events */
state = mousemask(ALL_MOUSE_EVENTS, NULL);
wmouse_trafo(menu_win, 0, 0,TRUE);
while(1)
{
c = wgetch(menu_win);
mvprintw(5 + count, 1, "Character %d %c ", c, c);
count = (count + 1) % 8;
refresh();
switch(c)
{
case
KEY_MOUSE:
mvprintw(4, 1, "event os Key Mouse");
refresh();
if(getmouse(&event) == OK)
{
mvprintw(4, 1, "event os Key Mouse");
refresh();
if(getmouse(&event) == OK)
{
...........................
...........................
Suneel