Disabling middle click on bottom of a clickpad / touchpad

539

Solution 1

If I type:

$ xinput get-button-map 'DLL07BF:01 06CB:7A13 Touchpad'

I get: 1 2 3 4 5 6 7

I tried using:

$ xinput set-button-map 13 1 2 0 4 5 6 7

It disabled middle and right click.

Solution 2

You can easily get that middle 'button' to stop registering with a command like this:

xinput set-button-map 11 1 2 0 4 5 6 7 8 9 10 11 12

The first argument here specifies the device ID (in this case 11 based on your above posted output from xinput), while the rest map buttons to functions. The first two are the left and right buttons (with 1 and 2 being a regular click and the context menu), the third is the middle button (normally it would be set as 3, but 0 tells xinput to map it to nothing), while the rest cover other things (scrolling, etc).

Adjusting the other two buttons to cover the whole bottom of the pad is a bit trickier, and may actually not be possible. Clickpads like this one work by having a single switch under the pad that triggers the click, and then watching where the finger is on the pad to determine which button to register it as. There are three different ways this might be handled:

  1. In the firmware of the pad itself, without configuration options.
  2. In the firmware of the pad itself, with configuration options.
  3. In the userspace part of the driver.

The second method is only ever the case if the device is not connected over an old PS/2 style serial connection (yours probably is connected this way, most Thinkpads are like this). Synaptics does this using method 3, and offers lots of config options for almost everything. I'm not sure how Elantech handles it, but I would guess it's probably the first case unless it's a USB or I2C connected device, in which case it's technically the third even though I'm pretty sure they have no special input driver for X.

Solution 3

Once you've figured out which number corresponds to which button, you can replace middle-click with right-click.

In my case, the second number mapped to middle-click:

1 2 3 4 5 6 7
  ^

So this replaces it with left-click:

xinput set-button-map x 1 1 3 4 5 6 7

Where x is the id obtained from xinput

Solution 4

Looks like order of buttons is Left Middle Right there. This worked for me.

xinput set-button-map 11 1 0 3 4 5 6 7
Share:
539
MrFox
Author by

MrFox

Updated on September 18, 2022

Comments

  • MrFox
    MrFox over 1 year

    Swagger allows setting the parameter type but with SwaggerWcf I can't edit this file, it's generated. It's set to body by default, but I need it to be path.

    One might think SwaggerWcfParameterAttribute would allow setting this. But it only allows Description and Required.

    How can it be set specifically?

    • tom redfern
      tom redfern almost 7 years
      Looks like path and query parameters are not supported. Have raised an issue on the author's githubL github.com/abelsilva/swaggerwcf/issues/74
    • MrFox
      MrFox almost 7 years
      @tomredfern Thanks, but using UriTemplate with a variable name enclosed in {} it does recognize that as a path parameter.
    • tom redfern
      tom redfern almost 7 years
      Cool - I've closed the issue.
  • tom redfern
    tom redfern almost 7 years
    Does this mean that the generated swagger defines the parameter as path though? Thanks
  • MrFox
    MrFox almost 7 years
    Thanks, I've tested this and it works. The parameter is not considered of type path.
  • comfreak
    comfreak over 5 years
    On my ThinkPad A485, running xinput get-button-map gives me 1 through 7 in ascending order. When I changed the third digit to 0, my right click was disabled, not the middle click. In my case the second digit was the middle click. However, I didn't set it to 0, but to 1, so now I don't have a dead space but rather an extended left click ;-)
  • comfreak
    comfreak over 5 years
    +1 for get-button-map
  • Kerem
    Kerem over 4 years
    type xinput list for a list of devices if you don't know your touchpad name by heart
  • Stefanos Chrs
    Stefanos Chrs over 3 years
    Same here for the X1
  • Chris S
    Chris S about 3 years
    @comfreak Came to this post 2 and a bit years later, and the exact same for my Legion Y470S. also had 1 - 7 as my xinput, and 2 was my middle click, so setting it to 1 gives me the extended left click. +1 for you!
  • Mariano Ruiz
    Mariano Ruiz over 2 years
    If you prefer a more "visual" solution, install GNOME Tweaks, open it, go to the Keyboards & Mouse tab, then in the Mouse Click Emulation section click the option Fingers. Optionally if you also want to disable the middle click for pasting in the console (at least for me is really annoying), in the same tab disable Middle Click Paste.
  • drkvogel
    drkvogel over 2 years
    This worked the best for me - if the sequence is 1 0 3 etc then there is a a dead area of the touchpad! So mapping middle-click to left-click is very sensible, thanks.