Reputation: 576
I having small doubt in generating mouse event from C program. I am writing a program to generate mouse events from a C program in linux. I have implemented mouse click,drag. .. etc using xlib. But dont have any idea about generating mouse scroll event.
Operating System : Fedora 15
Upvotes: 4
Views: 1572
Reputation: 8866
X11 has two mechanism to report scroll events. The old-fashioned way is to treat the scroll wheel as two extra mouse buttons: scroll up is reported as button 4 and scroll down as button 5 (or vice versa, I don't remember). The modern way is to report them via the XInput2 extension, which allows things like horizontal scrolling and smooth scroll and suchlike.
Upvotes: 1