zoukankan      html  css  js  c++  java
  • ubuntu下启用thinkpad小红点滚动功能

                                         ubuntu下启用thinkpad小红点滚动功能

                                                    周银辉 

    在ubuntu下面,小红点的中键滚动功能没了,很不习惯,下面把它启动起来,

    1, 一次性更改(重启后就无效了) 

    把下面这段脚本保存成 sh文件,比如trackPoint.sh

    #!/bin/sh
    xinput list | sed -ne 's/^[^ ][^V].*id=\([0-9]*\).*/\1/p' | while read id
    do
            case `xinput list-props $idin
            
    *"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 -"pointer = 1 9 3 4 5 6 7 8 2"

    然后更改文件属性为可执行
    chmod +x trackPoint.sh

    然后执行之

    ./trackPoint.sh

    2, 永久更改:
    建立如下文件(如果不存在):

    /usr/lib/X11/xorg.conf.d/20-thinkpad.conf

    在文件中加入如下内容:

    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

    保存,重启.... 

  • 相关阅读:
    jQuery 2.0.3 源码分析 回调对象
    JQuery+JQuery ui实现的弹出窗口+遮罩层+拖动+更改大小~!
    2019.8.25 小结
    2019.8.23 小结
    宜中食堂游记
    2019.8.21小结
    2019.8.22小结
    2019.8.19小结
    题解 CF499A 【Watching a movie】
    2019.8.18小结
  • 原文地址:https://www.cnblogs.com/zhouyinhui/p/1807301.html
Copyright © 2011-2022 走看看