Greetings Programs,
I hope this is the right place to post this question. I have been playing around with ncurses and I'm writing a small test program to test out the capabilities of ncurses. Everything seems to be fine until I start trying to use the mouse in my programs.
I'm using the default terminal xterm-256color on my mac book. When I echo $TERM I get xterm-256color and when I echo $TERMINFO I get /usr/share/terminfo
Seems fine to me. I'm not sure, but I searched the capabilities of xterm-256color and it shows over at wikipedia that it supports colors, mouse and many other capabilities.Following is my simple code
Code:
#include <ncurses.h>
int main()
{
initscr();
cbreak();
noecho();
mousemask(ALL_MOUSE_EVENTS, NULL);
int mouse_input = wgetch(stdscr);
endwin();
return 0;
}
This progy is written in C. I use gcc to compile and gdb to debug.Compile command: cc -Wall -g -lncurses ncurses_simple_mouse_demo.c -o ncurses_simple_mouse_demoWhen I debug I break at endwin() and run the program. wgetch(stdscr) doesn't seem to recognise any clicks but only recognises keyboard input!I'm not sure if this is right...I hope you guys can help me out...thank you in advance