urgent-need to get the number of left-right-double click
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
urgent-need to get the number of left-right-double click
hi everybody
can any one tell me how can i get the ocuurance of left click-right click-double click?
i need the time of ocurance and the click(left-right-double) that happend.
any software?
any clue..
i need it in linux environment(kde or gnome)
i appreciate you if you help me.
thanks
thanks SonnySee and Snark1994 for you response.
i went through xev but it can not give what i want. it just creat a window and within that every event captured. i need the clicks for every window running.
in man page it says that "You can also attach it to an existing window" how it can be done??maybe if i can attach it to the active window i am able to catch click event but how it is possible???
since i needed the events happening for each window running, i already went through xlib programming (c language) i achieved what i wanted except this mouse click,right and double click.
so i was loking for another way to do that.
XCreateSimpleWindow returns a window id that is unique to this program.
SOURCE:http://www.xmission.com/~georgeps/do..._Beginner.html
I don't know what methods you're using, but I'm sure there will be an analogous return value or method to obtain it however you create your windows. You can then run xev with the -id option to attach it to your window.
@Anisha: I tried your search, most of the results seemed to be about curses, except for one which was the man page for the Linux mouse driver. Was there a specific link you were trying to direct the OP to?
@Anisha: I tried your search, most of the results seemed to be about curses, except for one which was the man page for the Linux mouse driver. Was there a specific link you were trying to direct the OP to?
I wanted to point him to the first link which showed how to interact with the mouse through ncurses. Interacting with mouse means dealing with clicks so there could be a way to count the clicks from left right buttons. If I am wrong in judging the ncurses feel free to correct me.
this is simple program regarding your help it seems really good but when i run it nothing happend.what is the problem with it??
I am NOT a ncurses expert, what ever the problem with that program is and whatever errors you facing should be in a new thread in the programming section, then perhaps someone can help you that program.
If you're using ncurses, you need to read the ncurses man page to see how that needs to be initialized before you use any mcurses capabilities.
In the man page for mousemask(), it warns that under certain conditions, the function will return a particular value which indicates that mousemask() won't do anything for you in your particular operating environment.
So read both man pages, initialize ncurses properly, and check the result returned from mousemask().
Also, you can't printf from ncurses - stdout is being screwed around with to show the curses windows, so you can't print. The best I've found is printing to a file (which you could then view with tail -f in another terminal). You also need to call a whole load of functions to initialise curses (namely; "initscr()", "clear()", "noecho()", "cbreak()"). Like Anisha said, if you're having problems with ncurses, ask in another thread. Also, re-reading post #4, you want to capture every click (ie. in all windows), which is something that may not be possible using ncurses. Even with xev you would have to find the IDs of all running windows...
you want to capture every click (ie. in all windows), which is something that may not be possible using ncurses.
do you have any idea how can i get it,any tools or programming??
unfortunatly, i have not found a way to solve this problem, i just left with it and i dont know what to do??
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.