Description of problem: With synaptics it was possible to simulate middle button click when pressing both left and right touchpad buttons simultaneously. With libinput it doesn't work anymore Version-Release number of selected component (if applicable): xorg-x11-drv-libinput - 0.10.0 libinput - 0.15.0 How reproducible: always Steps to Reproduce: 1. Press touchpad left and right buttons on a firefox tab simultaneously Actual results: Either context menu is opened or the tab is being activated depending on the first button clicked. Expected results: The tab is closed
huh, weird, that should work just fine. Are those physical buttons or software buttons? What's the output of libinput-list-devices and libinput-debug-events when you press both buttons? and the output of gsettings get org.gnome.desktop.peripherals.touchpad click-method provided you're using gnome, the configuration of your DE regarding click methods otherwise. Thanks.
The strange thing is that this functionality works on the other laptop. The buttons are both physical. Here is the output of the list-devices: Device: AlpsPS/2 ALPS DualPoint TouchPad Kernel: /dev/input/event8 Group: 8 Seat: seat0, default Size: 76.92x41.18mm Capabilities: pointer Tap-to-click: disabled Left-handed: disabled Nat.scrolling: disabled Calibration: n/a Scroll methods: *two-finger edge Click methods: none debug-events (while pressing both buttons): event8 POINTER_BUTTON +16.47s 272 pressed, seat count: 1 event8 POINTER_BUTTON +16.47s 273 pressed, seat count: 1 event8 POINTER_BUTTON +16.57s 272 released, seat count: 0 event8 POINTER_BUTTON +16.59s 273 released, seat count: 0 I didn't find the configuration for click methods in KDE.
doesn't matter in this case anyway, if the buttons are physical there's no specific click method - your buttons are the click method :) also, can you update to 0.16 please, it's in updates-testing. The exact bit I need to look at was missing in 0.15 (should be between Nat.scrolling and Calibration). then run again. What I suspect is that middle button emulation is disabled by default, it should tell you when you re-run libinput-list-devices. If it is disabled can you please attach an evemu-describe of that device so we can look at why it is disabled. Does your touchpad have a physical middle button?
The thing is that I don't see the 0.16 in the update testing for some reason (and Ii know there is a 0.17 pending for testing, but it's not committed yet). I have no idea why I don't see it with updates-testing enabled. There is also AlpsPS/2 ALPS DualPoint Stick device (trackpad with 3 buttons except the touchpad with 2 buttons)
not sure about the repo issue, I think it just needs someone to hit a button somewhere. but you can grab it straight from koji: http://koji.fedoraproject.org/koji/buildinfo?buildID=641682
So, here goes list-devices (for some reason middle emulation is n/a): Device: AlpsPS/2 ALPS DualPoint TouchPad Kernel: /dev/input/event8 Group: 8 Seat: seat0, default Size: 76.92x41.18mm Capabilities: pointer Tap-to-click: disabled Left-handed: disabled Nat.scrolling: disabled Middle emulation: n/a Calibration: n/a Scroll methods: *two-finger edge Click methods: none evemu-describe is in the attachment
Created attachment 1035298 [details] evemu-describe
problem is simple: the device claims to have a middle mouse button: # Event code 274 (BTN_MIDDLE) and that's why we don't enable middle button emulation here. what laptop is this? can you attach your dmesg output here please?
That's a Dell Precision M2800. dmesg output is attached.
Created attachment 1036538 [details] dmesg
Hans, can you have a look at this please? Thanks.
Hi Yaroslav, Peter, I've just checked the kernel code and the problem is that the alps driver does not know if there are 2 are 3 buttons on the touchpad, so it always reports that there are 3 buttons. I seems the alps driver is unique in this, the elantech and synaptics drivers both only claim to have a middle button if there really is one (or atleast try to do so). Fixing this inside the alps driver is going to be quite hard as alps touchpad / trackstick combos will report the trackstick buttons through a touchpad packet (and thus through the touchpad's input-dev) as long as the trackpoint itself is not being used and the trackpoint usually has 3 buttons, so we need to claim button-middle even if we know there is none so as for the reporting of the trackpoint middle button to work through the touchpad input-dev. So it looks like we will need to treat alps touchpads the same way in libinput as mice which claim to have 3 buttons, allow middle button emulation but default it to off. Note that given the nastiness of reporting pointingstick buttons through the touchpad device, we will also need a flag for the middlebutton emulation code to NOT turn itself off if it sees a real middle click. Peter I'm currently quite busy with the backlight interface selection logic rewrite for the kernel which I've wanted to do for a long time already, if you have time can you write a libinput patch for this? Regards, Hans
yep, will do, renaming to make it easier to find. Yaroslav, pls attach the output of udevadm info --export-db here. Thanks
test build here: http://koji.fedoraproject.org/koji/taskinfo?taskID=10055530 Note that to enable middle button emulation you'll need an xorg.conf snippet, gnome does not have a toggle to expose this. Section "InputClass" Identifier "middle button on ALPS" MatchProduct "Alps" MatchDriver "libinput: Option "MiddleEmulation" "on" EndSection but now that I'm writing this I'm beginning to think we should just enable this by default rather than having it disabled by default.
Hi, (In reply to Peter Hutterer from comment #14) > but now that I'm writing this I'm beginning to think we should just enable > this by default rather than having it disabled by default. For (alps) touchpads only I presume, not for mice? If you only intend to do this for (alps) touchpads then ack. Regards, Hans
IMHO, middle button emulation should be enabled by default for ALPS touchpad, so behaviour is unchanged from how it used to be, prior to the introduction of libinput. And as Hans suggested above, it should remain enabled even after a "real" middle button event, so the guys who have combined touchpad and stick, wont have it switched off again the first top they use the stick "real" middle mouse button, but still want to have it emulated for the touchpad left/right button press.
Created attachment 1038952 [details] Ouput from udevadm info --export-db on Dell e5530 with ALPS TP Peter, I know you asked for this from Yaroslav, but as he has not replied yet and it may help, I attach my output from "udevadm info --export-db". It may help.
Created attachment 1038976 [details] Hack force middle emulation fot TouchPad Peter, I don't suspect this makes any difference for the info you are seeking, but the export-db output was generated with this patch applied to libinput, which was my quick hack yesterday to get middle mouse button emulation restored. ;)
Created attachment 1039072 [details] Ouput from "udevadm info --export-db" on Dell e6320 with combo ALPS TP and ALPS Stick Peter, Output from "udevadm info --export-db" from a Dell e6320 which has combo ALPS stick with physical LEFT/MIDDLE/RIGHT buttons, as well as ALPS TP with physical LEFT/RIGHT buttons.
Created attachment 1039093 [details] udevadm Dell M2800 Providing udevadm info --export-db for Dell Precision M2800
The solution proposed in comment #14 (the RPM built by koji plus the xorg snippet) works on a Latitude E7240. This model has a touchpad with 2 physical buttons, but has no stick.
Thanks for the tests, fwiw, the upstream version will have this enabled by default (for alps touchpads), so the config snippet won't be needed. (In reply to Hans de Goede from comment #12) > Note that given the nastiness of reporting pointingstick buttons through the > touchpad device, we will also > need a flag for the middlebutton emulation code to NOT turn itself off if it > sees a real middle click. forgot to reply to this earlier: we don't have that behaviour in libinput anyway. the middle button counts as another button, so all it does is reset the emulation state (release buttons accordingly) but it won't turn the emulation off for the next click.
Hi, After the last libinput update (v. 0.17.0-5.fc22) the middle click emulation is broken again on my Dell Latitude E5430. I was initially broken and then fixed at the beginning of June (see bug https://bugzilla.redhat.com/show_bug.cgi?id=1205771) I attach the evemu-record output
Created attachment 1043427 [details] evemu recording for the Dell E5430 touchpad
libinput 0.17.0-5.fc22 also breaks middle button emulation on Latitude E7240. The presence or absence of the xorg config snippet makes no difference. Downgrading back to 0.17.0-3.bz1227992.fc22 together with the xorg config snippet (i.e. the solution proposed in comment #14) restores functionality.
Test the 0.18 libinput version in updates-testing. You should find that this resolves, by always enabling middle button emulation for ALPS TP, without needing the xorg config. Works for me.
Indeed libinput 0.18.0-2.fc22 works without the xorg config snippet on Latitude E7240. Thanks!
Works for me too (Dell E5430). Thank you so much
https://admin.fedoraproject.org/updates/FEDORA-2015-10754/libinput-0.18.0-3.fc22