文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>ubuntu下启用thinkpad小红点滚动功能

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

时间:2010-08-24  来源:周银辉

                                     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 $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"

 

然后更改文件属性为可执行
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

 

保存,重启.... 

 

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载