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

    保存,重启.... 

  • 相关阅读:
    POJ1061:青蛙的约会+POJ2115C Looooops+UVA10673Play with Floor and Ceil(扩展欧几里得)
    扩展欧几里得算法
    常用数学公式
    实训作业
    sdut 迷之容器(线段树+离散化)
    HDU1556:Color the ball(简单的线段树区域更新)
    HDU1698:Just a Hook(线段树区域更新模板题)
    32位的二进制数
    HDU5139:Formula(找规律+离线处理)
    HDU5023:A Corrupt Mayor's Performance Art(线段树区域更新+二进制)
  • 原文地址:https://www.cnblogs.com/zhouyinhui/p/1807301.html
Copyright © 2011-2022 走看看