Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why doesn mouse scrolling work on Linux/Motif?

linux Motif mouse scrolling
0
Posted

Why doesn mouse scrolling work on Linux/Motif?

0

Mouse scrolling on Linux/Motif relies on the IMWheel driver. Here is how it works: • The X Server gets the wheel event. • Your /etc/X11/XF86Config must contain “ZAxisMap 4 5” (or the equivalent “Option” line if you use XFree86 4.x) in the Mouse section. This maps the wheel to emulated mouse buttons “4” and “5”. • IMWheel has a global hook on the mouse, only looking for button4/5 events. When it sees one, it looks in /etc/X11/imwheel which is a table of what to do for which application. E.g., GTK-based applications support the idea of 5-button mice natively, so the imwheel file says “do nothing (pass through) for gtk”. On the other hand, no known Motif-based app seems to know about these, so imwheel eats the mouse event and emits an accelerator event for “PgUp” or whatever your preference is. It has some clever pre-sets for xterm, netscape, and so on.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.