Update: now the middle-click emulation no longer works, so I'm more stuck than ever. Pressing buttons 1 and 3 acts as a scroll wheel just like pressing the middle button.

I have a lenovo keyboard with a trackpoint, but need the ability to middle-click and drag. While most of the articles out there say how to enable scroll wheel emulation, I have the opposite problem: The scroll functionality is on by default and I can't turn it off. I can work around the problem with middle emulation, but this is very awkward, because I need to use two hands to do it. Here are the properties reported:

$ xinput list-props 'pointer:Lenovo ThinkPad Compact USB Keyboard with TrackPoint'
Device 'Lenovo ThinkPad Compact USB Keyboard with TrackPoint':
        Device Enabled (155):   1
        Coordinate Transformation Matrix (157): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (290):       0
        libinput Natural Scrolling Enabled Default (291):       0
        libinput Scroll Methods Available (292):        0, 0, 1
        libinput Scroll Method Enabled (293):   0, 0, 0
        libinput Scroll Method Enabled Default (294):   0, 0, 1
        libinput Button Scrolling Button (295): 2
        libinput Button Scrolling Button Default (296): 2
        libinput Middle Emulation Enabled (297):        0
        libinput Middle Emulation Enabled Default (298):        0
        libinput Accel Speed (299):     0.000000
        libinput Accel Speed Default (300):     0.000000
        libinput Accel Profiles Available (301):        1, 1
        libinput Accel Profile Enabled (302):   1, 0
        libinput Accel Profile Enabled Default (303):   1, 0
        libinput Left Handed Enabled (304):     0
        libinput Left Handed Enabled Default (305):     0
        libinput Send Events Modes Available (275):     1, 0
        libinput Send Events Mode Enabled (276):        0, 0
        libinput Send Events Mode Enabled Default (277):        0, 0
        Device Node (278):      "/dev/input/event24"
        Device Product ID (279):        6127, 24647
        libinput Drag Lock Buttons (306):       <no items>
        libinput Horizontal Scroll Enabled (307):       0
        Evdev Wheel Emulation (391):    0

You can see I've already disabled the scroll methods available and the horizontal scroll. Even added the Evdev property for good measure. The only obvious thing that might still help is changing the scroll button (property 295), but I can't get that to work:

$ xinput set-int-prop 'pointer:Lenovo ThinkPad Compact USB Keyboard with TrackPoint' 295 8 3
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  131 (XInputExtension)
  Minor opcode of failed request:  57 ()
  Serial number of failed request:  19
  Current serial number in output stream:  20

I'm using Arch Linux. In an ideal world I could find a dynamic solution that lets me enable and disable the scroll wheel at will with a shell script. But out of desperation I'd also be interested in solutions involving xorg.conf or other approaches that require restarting the X server to enable or disable the wheel.

  • What I did in my answer here - is attacking the Synaptics Scrolling Distance (325) - might there possibly be something similar?
    – Cadoiz
    Jun 24, 2022 at 12:45

2 Answers 2


Try this:

xinput set-prop <device> 295 3

That seems not to be an int prop.

  • 1
    And what would be the inverse command, to restore the default setting? … … … … … … … … … … … … … … … … … Please do not respond in comments; edit your answer to make it clearer and more complete. Sep 15, 2020 at 3:56
  • @Scott get from the "Default" prop, and then set. Sep 18, 2020 at 4:07
  • This doesn't use libinput, right?
    – Cadoiz
    Jun 24, 2022 at 12:44

For trackpoints libinput defaults to On-Button Scrolling, often called mouse wheel emulation or virtual scrolling. Changing this value depends on your window manager but it will be reflective of the that libinput api.

For example, in sway you can call swaymsg -t get_inputs -r to get a json list of the inputs to your system, their identifiers and which libinput settings are currently applied. You can then use these to set the desired scrolling method. For example the relevant device for me is '2:10:TPPS/2_Elan_TrackPoint'. If I wish to disable the on-button scrolling I can either change the scroll_method to something other than on_button_down or I can set the scroll_button to disable or another key event (the default value here for me is 274 which corresponds to my middle mouse button); you can check what your default is with the previous get_inputs command so you can toggle the behavior on and off. As always see the man page for more details.

  • Thanks for the suggestion. Unfortunately, sway-input is probably just using libinput underneath, so if it doesn't work with libinput, it won't work with sway-input either. Apr 16, 2023 at 16:00
  • @user3188445 did you look at the first link? Specifically ` libinput_device_config_scroll_set_button()`? That's what sway should be calling under the hood. E.g., you can use sway or another way of calling that method to change the configuration for libinput to disable on-button scrolling.
    – kalebo
    Apr 17, 2023 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .