add EmulateWheelButtons for ThinkPads

Bug #26207 reported by Christian Neumair
This bug report is a duplicate of:  Bug #38272: option EmulateWheelTimeout not working. Edit Remove
10
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Ubuntu - when installed on a thinkpad - by default has

   Option "Emulate3Buttons" "true"

set for its "Configured Mouse" input device.
Since most users on ThinkPads use TrackPoint, it would be nice to bind the
middle mouse button to wheel emulation using

   Option "EmulateWheel" "true"
   Option "EmulateWheelButton" "2"

While some users (see below) probably want the middle mouse button, I think
having the 3 button emulation in place is enough for them, considering that I
don't know many newbies who use the middle mouse button very often.

Somewhere in the web, they say that beginning with X.org 6.9/7.0 releases, an
"EmulateWheelTimeout" option was added. We could take advantage of that as well
once 6.9/7.0 make it into Ubuntu.

From #ubuntu-laptop. When this was written, we didn't yet know about the
"EmulateWheelTimeout" option:

8:59:17 <Manny> I've installed ubuntu on a TP43, and on a TP41 and none of them
has stock wheel emulation support. Are the setup routines fixed in dapper, or
was it intentional that the "EmulateWheel" and "EmulateWheelButton" options of
the configured mouse are not initialized?
18:59:43 <Manny> oh, and I installed stock breezy, as shipped by canonical :)
9:04:42 <mdke> Manny, if I've understood the question, I believe it is a choice
between wheel emulation as default, and middle click as default. They appear to
have gone with the latter
19:05:28 <Manny> mdke, what do you mean by "middle click as default"?
19:05:57 <mdke> perhaps i didn't understand your question. Are you referring to
the middle button above the touchpad on a thinkpad?
19:06:24 <mdke> this acts as middle click, rather than a wheel
19:06:28 <Manny> yes, it should be used for wheel emulation, and the xorg.conf
by default IMHO even contains a "Emulate3Button" entry
19:07:02 <mdke> i like it as middle click tbh, because I use that for closing
firefox tabs and such, whereas I don't really use the wheel emulation thing
19:07:23 <mdke> and pasting stuff
(...)
19:43:36 * Manny doubts many people need a third button compared to the people
that need wheel emulation, particularly when considering newbies
(...)
19:51:54 <mdke> Manny, i use it for copy/paste too, i find a button quite
uncomfortable for wheel scrolling, but you are probably right

Revision history for this message
Daniel Stone (daniels) wrote :

while I'm a big rap for thinkpads myself, I'm torn on this bug. while it does
track the default behaviour as seen on windows, we owe it to all our users that
have previously used ubuntu not to surprise them by changing the default
behaviour; ditto all previous linux users.

Revision history for this message
David Meier (droebbel-melta) wrote :

Now EmulateWheel is in dapper's xorg, but EmulateWheelTimeout is broken. So the middle button cannot be used to paste while configured for scrolling.

There is a bug report about this upstream: https://bugs.freedesktop.org/show_bug.cgi?id=5071

The fix provided there solves the issue.
https://bugs.freedesktop.org/attachment.cgi?id=4316

Daniel Stone (daniels)
Changed in xorg:
assignee: daniels → nobody
Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Hm, default settings are always controversial. The long term answer is probably to add features to the Mouse settings dialogs in Gnome/KDE that are switched on by the presence of specific hardware. Most laptops, and esp. thinkpads come with a range of utilities in Windows that let you set these kinds of things. That way everyone has a chance to be happy :)

Let's continue this through the specification process: https://wiki.ubuntu.com/FeatureSpecifications I'm closing it as a bug.

Changed in xorg:
status: Confirmed → Rejected
Revision history for this message
Christian Neumair (chris-gnome-de) wrote :

Henrik: Why do you close this bug report? I'm well aware that run-time configuration would be nice, and I even volunteer to write a simple application for setting these options, but as of writing X.Org is not run-time configurable, so a mid-term fix would be to add this option to the default xorg.conf file. Besides, I couldn't find any well-tested xorg.conf parsing libraries.

My complaints are well-founded, and while it is a matter of taste it's very likely that this aggressively advertized ThinkPad feature will be used by most of the users.

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Christian, I haven't tried the wheel emulation feature. How does it work? Does it scroll in one direction (down) at a fixed speed? It could be argued that that is a poor substitute for a scrolling wheel that can scroll up and down at variable speeds.

Can we separate this out into separate issues? You say that EmulateWheelTimeout is broken. Should that be filed as a separate bug? The option that you want to add to xorg.conf, can that be added in such a way that it reproduces the current middle-click functionality but makes it easier to change it to scrolling mode? If so, then that is probably a realistic feature goal for dapper, while the GUI config app would be a better target for dapper+1.

I'm happy for you to re-open the bug if you like, since you clearly know the issues better than I do (and have the hardware). I would just ask you to consider what is achievable for dapper with the given constraints on time and resources (we are now way past feature freeze: https://wiki.ubuntu.com/DapperReleaseSchedule). Splitting it more cleanly into smaller bugs and feature requests might help.

Revision history for this message
Philip Ganchev (philip-cs) wrote :

It works like this. You hold down the button specified as "EmulateWheelButton" and move the pointing device. The pointer does not move, but the window directly below it scrolls in any direction it can if both XAxisMapping and YAxisMapping are set. It scrolls by increments, just as turning a scroll wheel by a few notches. This is especially useful for trackpoint pointing devices, where the scrolling is controlled by the pressure applied to the trackpoint. So I would say it is about as good as a scroll wheel or ball.

It does seem that the two issues can be separated: the option "EmulateWheelTimeout" and the configuration tool. Before the timeout is working, I think it would be best to emulate the wheel and emulate button 2 by pressing buttons 1 and 3 (Option "Emulate3Buttons"). That way, novice Unix users would get the functionality they are used to, but can still use button 2 events on the rare occasions they need to; Unix users will realize button 2 generates scrolling events, and hopefully think of pressing buttons 1 and 3 simultaneoulsy.

Either way, there could be an introduction especially for Thinkpad users on first log in.

Revision history for this message
RichardNeill (ubuntu-richardneill) wrote :

With Edgy, the following settings work perfectly on my T60p.

xorg.conf:

Section "InputDevice"
        Identifier "Trackpoint"
        Driver "mouse"
        Option "CorePointer"
        Option "Device" "/dev/input/trackpoint"
        Option "Protocol" "ExplorerPS/2"
        #Option "ZAxisMapping" "4 5"
        #Option "Emulate3Buttons" "true" #No need to disable this
        Option "EmulateWheel" "true" #Required for thinkpads
        Option "EmulateWheelButton" "2" #Required for thinkpads
        Option "EmulateWheelTimeout" "200" #Allows paste as well as scroll
        Option "XAxisMapping" "6 7" #Horiz scroll
        Option "YAxisMapping" "4 5" #Vert scroll
EndSection

/etc/udev/rules.d/10-local.rules:

[rjn@caramel ~/gyro]$ cat /etc/udev/rules.d/10-local.rules
#Rule for the trackpoint: udevinfo -a -p /sys/class/input/mouse1
BUS=="input", kernel=="mouse*", SYSFS{name}=="TPPS/2 IBM TrackPoint", NAME="input/%k", SYMLINK="input/trackpoint"

#Rule for the synaptics touchpad: udevinfo -a -p /sys/class/input/mouse0
BUS=="input", kernel=="mouse*", SYSFS{name}=="SynPS/2 Synaptics TouchPad", NAME="input/%k", SYMLINK="input/touchpad"

Firefox -> about:config:

mousewheel.horizscroll.withnokey.action = 0
#This is required, otherwise a slight sideways motion when scrolling makes the browser jump forwards/backwards!

NOTE 1: The only downside of this is that xfig breaks. Xfig is the only application I know of which actually uses middle-button-drag as a distinct operation.

NOTE 2: On really old thinkpads (eg A22p), we want to have EmulateWheel on (on button 2), and emulate3buttons on, but EmulateWheelTimeout = 0. This is because the older TPs have a more useful button mouse layout.

Revision history for this message
Bai Lee (calidion) wrote :

scrolling with middle key is the most important feature to me.
especially when i navigates the web site.
please help to make it easy to use.
and make this support default.
thank you so much.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.