Enable the ThinkPad red dot scroll function in Ubuntu

Source: Internet
Author: User

Enable the ThinkPad red dot scroll function in Ubuntu

Zhou yinhui

 

In ubuntu, the middle-key scrolling function of the red dot is gone, and it is not used to it. We will start it below,

 

1. One-time change (it will be invalid after restart) 

Save the following script as a sh file, such as trackpoint. Sh.

# ! /Bin/sh
Xinput list | Sed -Ne 'S / ^ [^] [^ V]. * ID = \([ 0 - 9 ] * \). */ \ 1 / P' |   While Read ID
Do
Case 'xinput list - Props $ ID ' In
* " Middle button emulation " * )
Xinput set - Int - Prop $ ID   " Evdev wheel emulation "   8   1
Xinput set - Int - Prop $ ID   " Evdev wheel emulation button "   8   2
Xinput set - Int - Prop $ ID   " Evdev wheel emulation timeout "   8   200
Xinput set - Int - Prop $ ID   " Evdev wheel emulation Axes "   8   6   7   4   5
Xinput set - Int - Prop $ ID   " Evdev middle button emulation "   8   0
;;
Esac
Done

#Disable middle button
Xmodmap-E"Pointer = 1 9 3 4 5 6 7 8 2"

 

Then, change the file property to executable.
Chmod + x trackpoint. Sh

Then execute

./Trackpoint. Sh

 

2. Permanent modification:
Create the following file (if it does not exist ):

/Usr/lib/X11/Xorg. conf. d/20-thinkpad.conf

Add the following content to the file:

Section " Inputclass "
Identifier " Trackpoint wheel emulation "
Matchproduct " Trackpoint "
Matchdevicepath " /Dev/input/event * "
Driver " Evdev "
Option " Emulatewheel "   " True "
Option " Emulatewheelbutton "   " 2 "
Option " Emulate3buttons "   " False "
Option " Xaxismapping "   " 6 7 "
Option " Yaxismapping "   " 4 5 "
Endsection

 

Save and restart ....

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.