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

    保存,重启.... 

  • 相关阅读:
    关于quartusII 错误 Error: Current license file does not support the EP*** device 错误原因总结
    怎样用delphi关闭并重新启动 explorer.exe进程
    SQL创建链接服务器
    C#服务启动以及服务指令
    底部广告弹出
    选项卡
    tab切换
    pagex/y offsetx/y screenx/y clientx/y 用法及区别
    放大镜jQuery效果
    放大镜js实现效果
  • 原文地址:https://www.cnblogs.com/zhouyinhui/p/1807301.html
Copyright © 2011-2022 走看看