Unfortunately, if you press and hold one of these special buttons, the trackball only sends a single press event. So, if you want to scroll a document up or down, you have to repeatedly click buttons 4 and 3 respectively, which is highly annoying: you end up going to the scroll bar and using it rather than the two buttons.
The Windows and Mac OS X drivers solve this by generating press and release events periodically for those buttons while they are pressed. This way, the application sees as if you had clicked them multiple times. Very comfortable.
I didn't mention NetBSD in the previous paragraph because it doesn't support this feature. That is, it handles those buttons as two extra regular buttons (in fact, they are from the hardware's point of view). And no, neither Linux, XFree86 nor X.Org provide options to simulate the expected behavior as far as I can tell.
So, what did I do? Add support to NetBSD's mouse driver (wsmouse) to simulate automatic button repeating. This way, I can use the trackball to its full power — hey, I got that model precisely because those two buttons!
This new feature is customizable through a set of nodes exposed by wsconsctl(8), as seen below:
# wsconsctl -m -a | grep repeatrepeat.buttons indicates which buttons are subject to automatic event repeating. The other three variables indicate the delays used to control how often events are sent. Three are needed because they the feature supports acceleration. That is, the first time you click a button, it will take 200ms until the first repeated event is sent. The second event will be sent after 175ms; the third after 150ms and so on until the events are separated 50ms each other (the minimum). Useful to scroll large documents.
repeat.buttons=3 4
repeat.delay.first=200
repeat.delay.decrement=25
repeat.delay.minimum=50
5 comments:
s/mouse/ratónnn/g (ho sento, no m'hi he pogut estar XD)
--Brainstorm
I too bought a Logitech Marble Mouse, which I would very much like to use with NetBSD. I need three mouse buttons though, so at a minimum I would like the 'scroll down' button to be seen by wsmouse as the middle mouse button. Ideally it would be nice if I could hold down the 'scroll up' button and move the ball to simulate a scroll wheel. Does this sound possible?
Lopta: Can't you use X's Emulate3Buttons feature so that you have three mouse buttons plus the two scrolling ones?
Anyway, about holding down a button and then moving the ball to simulate scrolling... I *think* it is possible. Take a look to the EmulateScrollWheel option in X's mouse configuration (I don't remember if that's exactly the name) or DragLockButtons.
I'm making do with Emulate3Buttons at the moment, but would much prefer a single physical button to press. Is EmulateScrollWheel just in NetBSD-current?
Sorry. This morning I was typing from the iBook and coudln't remember the exact name.
It is EmulateWheel, together with EmulateWheelButton and EmulateWheelInertia. I don't know if these are only in current, though.
I guess you could get them by installing the latest version of XFree86 or X.Org from pkgsrc in case you do not want to mess with current nor xsrc.
Check out the mouse(4) manual page for more details.
Post a Comment