Mouse events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
 

    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)
                {
                    ...........................
                    ...........................
 
 
Suneel

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux