开发者

Generating Mouse Scroll Event in Linux

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. 开发者_StackOverflow

Operating System : Fedora 15


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜