找回密码
 注册
快捷导航
查看: 17901|回复: 16

如果你还在抱怨指点杆不好用,看这个文章,保证你的指点杆比windows下还爽

[复制链接] |自动提醒
阅读字号:

232

回帖

6

积分

287

资产值

高级会员 Rank: 2Rank: 2

注册时间
2002-9-4
铜牌荣誉勋章(注册8年以上会员)银牌荣誉勋章(注册10年以上会员)
发表于 2006-12-21 14:20:35| 字数 11,270| - 中国–上海–上海 电信 | 显示全部楼层 |阅读模式
http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint
原文

我就用了下面两条指令,就感觉和windows下的最大灵敏度一样了
------------------------------------
echo -n 140 > /sys/devices/platform/i8042/serio0/speed
echo -n 250 > /sys/devices/platform/i8042/serio0/sensitivity
---------------------------------------


如果你要细细研究,仔细看看下文

Contents
[hide]

    * 1 General Configuration
    * 2 Most common Features
          o 2.1 Press to Select
          o 2.2 Sensitivity & Speed
          o 2.3 Scrolling
                + 2.3.1 Using a kernel prior to 2.6.11
                + 2.3.2 Using the X server (kernel 2.6.11+)
                      # 2.3.2.1 EmulateWheelTimeout temporarily broken (-> fix for Ubuntu Dapper)
                      # 2.3.2.2 Older versions of X.org
    * 3 Soft Transparent Mode
    * 4 Modify trackpoint parameter permanently in trackpoint.h
    * 5 Configure firefox for using trackpoint horizontal scrolling
    * 6 Configure Opera for using trackpoint horizontal scrolling

        The kernel trackpoint driver is controlled by echoing values to special files. Common configuration options are outlined below.
NOTE!

    * Starting from 2.6.13 config files for this driver are located in /sys/devices/platform/i8042/serio0/serio2. (This document uses the new locations.)
    * From 2.6.11 on, they are in /sys/devices/platform/i8042/serio0.
    * Prior to kernel 2.6.11, these files were located in /proc/trackpoint.
    * Prior to kernel 2.6.9, these files were not files at all, but were command-line options to the psmouse module. (Note this means you must compile psmouse as a module!) See http://stephen.evanchik.com/node/16.
    * In Kernel 2.6.19 we have to use /sys/devices/platform/i8042/serio1 instead of serio0!!!

[edit]
General Configuration

The configuration options are reflected by the files you can find in /sys/devices/platform/i8042/serio0/serio2. See the TrackPoint driver page for a complete list. Configuration is done by echoing the appropriate values into these special files.
[edit]
Most common Features

The most common settings are Press to Select, sensitivity, speed and scrolling.
[edit]
Press to Select

Press to Select allows you to tap the control stick which will simulate a left click. You can enable this feature by typing the following in to a terminal (you may need to be root):

    # echo -n 1 > /sys/devices/platform/i8042/serio0/press_to_select

Press to Select should now be enabled. You can disable it in a similar manner:

    # echo -n 0 > /sys/devices/platform/i8042/serio0/press_to_select

You can use this script to automate the operation

       #!/bin/bash
       if [ "$1" = "1" ]; then
               echo "Turning on tap on TrackPoint"
               echo -n 1 > /sys/devices/platform/i8042/serio0/press_to_select
               exit 0
       fi
       if [ "$1" = "0" ]; then
               echo "Turning off tap on TrackPoint"
               echo -n 0 > /sys/devices/platform/i8042/serio0/press_to_select
               exit 0
       fi
       echo -n "Tap status: "
       cat /sys/devices/platform/i8042/serio0/press_to_select

[edit]
Sensitivity & Speed

Adjusting the speed and sensitivity of the TrackPoint requires echoing a value between 0 and 255 into the appropriate file. For example, for a speed of 120 and a sensitivity of 250, type the following into a terminal:

    # echo -n 120 > /sys/devices/platform/i8042/serio0/serio2/speed
    # echo -n 250 > /sys/devices/platform/i8042/serio0/serio2/sensitivity

Feel free to experiment with your settings until you find a combination that is comfortable.

When you satisfy your setting , add the two lines into /etc/rc.d/rc.local in order to avoid restoring the default setting every time the system reboots.
[edit]
Scrolling
[edit]
Using a kernel prior to 2.6.11

The scrolling action is essentially the same as is used in the TrackPoint Windows drivers. To enable this feature, type the following in to a terminal (you may need to be root):

    # echo -n 1 > /proc/trackpoint/scroll

Then press the middle button and push the stick up and down to scroll. Similarly, to disable scrolling:

    # echo -n 0 > /proc/trackpoint/scroll

[edit]
Using the X server (kernel 2.6.11+)

The scroll setting has been removed from the trackpoint driver in kernel versions 2.6.11 and above. Scroll emulation should now be handled in the X server.

A nice side effect of that is, that middle button scrolling applies to any mouse and not just the TrackPoint interface, which can be a quite handy feature for desktop computers or people who prefer to use an external mouse, especially when scrolling through long lists or needing to use horizontal scrolling with a mouse which has only a vertical scroll wheel.

The necessary functionality, known as "EmulateWheelTimeout" allowing to use button 2 for a middle click, wasn't implemented in Xorg prior to 6.9/7.0. However, there was a patch included in most distributions packages of Xorg, which was announced here. You can find an updated version of the package in the experimental branch of Debian or try to build the mouse driver yourself with the information in the announcement. This has successfully been tried with FC3's 6.8.2 packages.

Once this functionality is in the X.org, add these lines to your TrackPoint configuration section in /etc/X11/xorg.conf:

       Option          "EmulateWheel"          "on"
       Option          "EmulateWheelButton"    "2"

It may also be necessary to add these lines:

       Option "YAxisMapping" "4 5"
       Option "XAxisMapping" "6 7"

which specify which buttons are mapped to motion in the vertical (Y) and horizontal (X) directions, respectively, in wheel emulation mode (see http://www.xfree86.org/current/mouse.4.html).
Hint:
Use the program "xev" to see, what mouse button identifiers are sent by your mouse/touchpad/trackpoint.


So, a complete mouse section, that implements this nicely and works very well on my R51, even with a simultaneously connected USB mouse, looks like that (tried out today, 20th of September, 2006 on Dapper):

Section "InputDevice"
       Identifier  "Configured Mouse"
       Driver      "mouse"
       Option      "CorePointer"
       Option      "Device"              "/dev/input/mice"
       Option      "Protocol"            "ExplorerPS/2"
       Option      "Emulate3Buttons"     "on"
       Option      "Emulate3TimeOut"     "50"
       Option      "EmulateWheel"        "on"
       Option      "EmulateWheelTimeOut" "200"
       Option      "EmulateWheelButton"  "2"
       Option      "YAxisMapping"        "4 5"
       Option      "XAxisMapping"        "6 7"
       Option      "ZAxisMapping"        "4 5"
EndSection

I don't really understand at the moment why it works with the same mappings for X and Z, but I thought you got to know!

Now restart X and hold down button 2 and move the mouse to scroll, or just press and release button 2 for a middle click.
NOTE!
With the above mouse section in my xorg.conf all this works like a charm:

    * I can press the wheel on my external USB mouse and move the mouse up and down for scrolling
    * or I can just use the wheel on the external mouse for scrolling
    * or pressing the MMB button of the trackpoint and use the trackpoint for scrolling.
    * Even horizontal scrolling works automagically in Konqueror, for Firefox/Opera see below.

Simultaneously I can use

    * a press on the external mouse's wheel
    * or the MMB of the trackpoint

for pasting the buffer. Lovely!
Hint:
If you don't use the middle-mouse-button for pasting and sometimes pasting things by mistake while scrolling (witch is really odd) simply set the "EmulateWheelTimeOut" to "1" as a (bloody) workaround. Middle click will only possible with pressing left and right button simultaneously!


[edit]
EmulateWheelTimeout temporarily broken (-> fix for Ubuntu Dapper)

Unfortunately, there was a regression so that EmulateWheelTimeout was broken in X.org 6.9.0, and fixed on March 20th, 2006. You can see the primary bug report here, and also reports on the Mandriva and Debian (#346098, #320136) packages.

Unfortunately, this bug is still present in Ubuntu Dapper Drake's xserver-xorg-input-mouse package (version 1.0.3.1+cvs.20060109-0ubuntu1)!
Hint:
xserver-xorg-input-mouse (version 1.0.3.1+cvs.20060109-0ubuntu1.1) is in dapper-updates since July 3rd, 2006. You don't need to patch it anymore.

Use the following procedure to make it (middle button scrolling & middle button pasting) work:

    $ cd /desired/path && mkdir tmp && cd tmp (create temporary directory somewhere)
    $ sudo nano /etc/apt/sources.list (insert/uncomment the deb-src lines, save and exit)
    $ sudo apt-get update
    $ apt-get source xserver-xorg-input-mice (in order to get the source code)
    $ sudo aptitude install xserver-xorg-dev (this package and the packages it depends on are needed in order to compile the source code, use aptitude for easy removal later on)
    $ cd xserver-xorg-input-mouse-1.0.3.1+cvs.20060109/
    $ wget http://librarian.launchpad.net/2 ... 09-0ubuntu2.debdiff (downloads the patch that fixes the bug)
    $ patch -p1 < xserver-xorg-input-mouse_1.0.3.1+cvs.20060109-0ubuntu2.debdiff (applies the bug fix)
    $ fakeroot dpkg-buildpackage (rebuilds the package... watch out for errors and install other missing packages)
    $ sudo dpkg -i ../xserver-xorg-input-mouse_1.0.3.1+cvs.20060109-0ubuntu2_i386.deb (installs the rebuilt built package)
    $ sudo aptitude remove xserver-xorg-dev (removes the packages needed to rebuild the package)

Hope it works for you, it did work for me! CrypTom
[edit]
Older versions of X.org

For older versions of Xorg or for Xfree86 (/etc/X11/XF86Config) try this:

      Option          "Emulate3Buttons"       "true"
      Option          "EmulateWheel"          "true"
      Option          "EmulateWheelButton"    "2"

Now restart X and hold down button two and move the mouse for scrolling. To get a middle click, press buttons 1 and 3 simultaneously.
[edit]
Soft Transparent Mode

If you wish to connect a special device to the external PS/2 port, you should consider using "Soft Transparent Mode" so that the TrackPoint controller does not interpret any commands sent to the external PS/2 port. You can enable soft transparent mode by typing the following in to a terminal:

    # echo -n 1 > /sys/devices/platform/i8042/serio0/serio2/transparent

Disabling soft transparent mode is similar:

    # echo -n 0 > /sys/devices/platform/i8042/serio0/serio2/transparent

[edit]
Modify trackpoint parameter permanently in trackpoint.h

If you do not want to run a script to reconfigure the trackpoint you can change the default settings in the trackpoint header file that is located in

/usr/src/<KERNEL_VERSION>/drivers/input/mouse/trackpoint.h.

First you must convert the values (decimal numbers) you normaly echo to /sys/[...] to hex:

echo -e 'obase=16;<DECIMAL_NUMBER>' | bc

Then simply replace the default hex values in trackpoint.h, run 'make && make modules_install' to recompile and install psmouse.ko (should be compiled as module)


Example patch (speed=100, sensitivity=190, press_to_select=1):

--- trackpoint.h.orig   2006-01-17 16:18:30.000000000 +0100
+++ trackpoint.h        2006-01-17 16:25:47.000000000 +0100
@@ -108,9 +108,9 @@
/*
  * Default power on values
  */
-#define TP_DEF_SENS            0x80
+#define TP_DEF_SENS            0xBE
#define TP_DEF_INERTIA         0x06
-#define TP_DEF_SPEED           0x61
+#define TP_DEF_SPEED           0x64
#define TP_DEF_REACH           0x0A

#define TP_DEF_DRAGHYS         0xFF
@@ -123,7 +123,7 @@

/* Toggles */
#define TP_DEF_MB              0x00
-#define TP_DEF_PTSON           0x00
+#define TP_DEF_PTSON           0x01
#define TP_DEF_SKIPBACK                0x00
#define TP_DEF_EXT_DEV         0x01

[edit]
Configure firefox for using trackpoint horizontal scrolling

Vertical Scrolling seems to work out of the box in firefox if you followed the steps above. Anyway, there is a problem when you doesnt scroll exactly vertical, because horizontal scrolling turns into browser BACK/FORWARD commands. You can avoid this by typing about:config + ENTER in the address bar of firefox. You have to adjust the following options:

mousewheel.horizscroll.withcontrolkey.action = 3;
mousewheel.horizscroll.withcontrolkey.numlines = 1;
mousewheel.horizscroll.withcontrolkey.sysnumlines = true;

mousewheel.horizscroll.withnokey.action = 0;
mousewheel.horizscroll.withnokey.numlines = 1;
mousewheel.horizscroll.withnokey.sysnumlines = true;

mousewheel.horizscroll.withshiftkey.action = 1;
mousewheel.horizscroll.withshiftkey.numlines = 1;
mousewheel.horizscroll.withshiftkey.sysnumlines = true;

[edit]
Configure Opera for using trackpoint horizontal scrolling

You'll experience the same annoying problem with the popular browser Opera. To fix this you need to edit the configfile standard_mouse.ini in e.g. /usr/share/opera/ini/ (Debian) or /opt/opera/share/opera/ini/ (Gentoo) and comment out the following lines

Button6                                                        = Back
Button7                                                        = Forward

so they look like that

;Button6                                                        = Back
;Button7                                                        = Forward

Remember, Button6 and Button7 do not so coincidental correspond with our X configuration we know from above:

Option "YAxisMapping" "6 7"

After this change you will be able to scroll vertically and horizontally with your middle button.

[ 本帖最后由 chhts 于 2006-12-21 14:30 编辑 ]

5038

回帖

0

积分

3729

资产值

初级会员 Rank: 1

注册时间
2005-10-27
发表于 2006-12-21 20:22:29| 字数 43| - 中国–北京–北京 北京宽捷网通信技术有限公司BGP节点(河北电信+北京联通) | 显示全部楼层
文章又臭又长,中文都没功夫看,更别说英文。。。。

不过你推荐的两条,的确管用不少,谢谢了
Evil's always stopping me God has been protecting me That's how i gat this far
回复 支持 反对

使用道具 举报

1462

回帖

1

积分

8177

资产值

入门会员 Rank: 1

注册时间
2005-3-21
铜牌荣誉勋章(注册8年以上会员)
发表于 2006-12-22 19:12:14| 字数 10| - 中国–广东 联通数据上网公共出口 | 显示全部楼层
没时间研究,太复杂了
签名违规,已被删除!
回复 支持 反对

使用道具 举报

3858

回帖

0

积分

3981

资产值

入门会员 Rank: 1

注册时间
2004-10-4
发表于 2006-12-24 11:47:18| 字数 6| - 中国–广东–珠海 电信 | 显示全部楼层
呵呵,用鼠标
出X23电池!
回复 支持 反对

使用道具 举报

319

回帖

0

积分

472

资产值

入门会员 Rank: 1

注册时间
2005-7-16
发表于 2006-12-24 12:45:03| 字数 5| - 中国–江苏–南京 电信/东南大学九龙湖校区宿舍宽带 | 显示全部楼层
很好,感谢
T43 Pm740/2048mb/5k120 80g/x300 64m/14'1 sxga+/combo
回复 支持 反对

使用道具 举报

2275

回帖

0

积分

4259

资产值

入门会员 Rank: 1

注册时间
2004-4-14
发表于 2007-1-8 21:28:17| 字数 78| - 中国–江苏–苏州 电信 | 显示全部楼层
指点杆中键滚动到现在还没有解决。
指点杆和触摸板必须要用Synaptics Touchpad驱动,换ps2explore重启后就驱动不起来。测试是可以的。奇怪。
Thinkpad X201 GF9
Nikon D7000
NOKIA E72
IPAD 32G Wifi
IPOD NANO II
回复 支持 反对

使用道具 举报

148

回帖

0

积分

0

资产值

入门会员 Rank: 1

注册时间
2005-10-3
发表于 2007-1-10 16:40:48| 字数 15| - 中国–陕西–西安 电信 | 显示全部楼层
按照楼主的方法试了一下,不错!
留下一片树叶
X30
回复 支持 反对

使用道具 举报

3533

回帖

0

积分

507

资产值

入门会员 Rank: 1

注册时间
2005-4-20
发表于 2008-8-11 01:16:09| 字数 8| - 中国–上海–上海 东方有线 | 显示全部楼层
命令是什么原理?
Surface Win8 128GB 1303
Apple Air 11" 128GB 1302
X61 -B54 0804
T42 -Nth 0504
回复 支持 反对

使用道具 举报

2654

回帖

0

积分

4023

资产值

入门会员 Rank: 1

注册时间
2002-8-4
铜牌荣誉勋章(注册8年以上会员)银牌荣誉勋章(注册10年以上会员)
发表于 2008-8-19 15:44:04| 字数 150| - 日本 | 显示全部楼层
QUOTE:
Posted by voodoo_cat on 2007-1-8 21:28
指点杆中键滚动到现在还没有解决。
指点杆和触摸板必须要用Synaptics Touchpad驱动,换ps2explore重启后就驱动不起来。测试是可以的。奇怪。

啊?刚想赞同一下,突然发现已经一年半了?不知道现在解决没有。。。。
买小黑只买经典的:X22-T23-T41-X60s-X300
现在手头 X201/X220IPS/T420s
回复 支持 反对

使用道具 举报

1万

回帖

172

积分

8万

资产值

至尊会员II Rank: 4Rank: 4Rank: 4Rank: 4

注册时间
2006-2-27
银牌荣誉勋章(注册10年以上会员)年全勤勋章2022铜牌荣誉勋章(注册8年以上会员)月全勤勋章
发表于 2009-2-9 10:26:59| 字数 10| - 中国–陕西–西安 联通/外事学院 | 显示全部楼层
命令怎么用? 还求详解
x230 WQXGA/x13 yoga gen2 WUXGA/x1tablet gen2
A3092/pixel Ⅴ/pixel Ⅶ
回复 支持 反对

使用道具 举报

165

回帖

7

积分

400

资产值

高级会员 Rank: 2Rank: 2

注册时间
2009-1-16
发表于 2009-4-23 23:17:18| 字数 270| - 中国–陕西–西安 教育网/西安交通大学 | 显示全部楼层
只要在inputdevice下添加
        Option             "EmulateWheel" "on"
        Option      "EmulateWheelButton" "2"
        Option      "YAxisMapping" "4 5"
        Option      "XAxisMapping" "6 7"
指点杆中键滚动上下左右移动都ok
在新内核里下面文件位置变动到
/sys/devices/platform/i8042/serio1/serio2/
回复 支持 反对

使用道具 举报

57

回帖

0

积分

75

资产值

入门会员 Rank: 1

注册时间
2007-12-26
发表于 2009-5-1 23:53:26| 字数 48| - 中国–重庆–重庆 联通 | 显示全部楼层
不用啦!
ubuntu9.04已经完美支持指点杆了!连以前能用但不能亮的无线设备灯都正常了,哦也!
T61P-AR4/T7500/2GB/160GB/NVS570M 128MB
回复 支持 反对

使用道具 举报

5093

回帖

45

积分

5630

资产值

钻石会员 Rank: 3Rank: 3Rank: 3

注册时间
2008-6-18
发表于 2009-5-7 23:10:38| 字数 99| - 中国–湖南–郴州 电信 | 显示全部楼层
QUOTE:
Posted by 硫酸泼熊 on 2009-5-1 23:53
不用啦!
ubuntu9.04已经完美支持指点杆了!连以前能用但不能亮的无线设备灯都正常了,哦也!


指点杆是可以了,但是中键还是废的哦。
10.04
回复 支持 反对

使用道具 举报

691

回帖

0

积分

811

资产值

入门会员 Rank: 1

注册时间
2008-6-18
发表于 2009-6-2 21:04:42| 字数 16| - 中国–江西–南昌 电信 | 显示全部楼层
还没看懂这个是要加到什么位置阿?
回复 支持 反对

使用道具 举报

5093

回帖

45

积分

5630

资产值

钻石会员 Rank: 3Rank: 3Rank: 3

注册时间
2008-6-18
发表于 2009-6-3 06:53:11| 字数 79| - 中国–湖南–郴州 电信 | 显示全部楼层
QUOTE:
Posted by god0917 on 2009-6-2 21:04
还没看懂这个是要加到什么位置阿?


下载个 configure trackpoint 就可以了。
10.04
回复 支持 反对

使用道具 举报

8952

回帖

59

积分

1万

资产值

钻石会员 Rank: 3Rank: 3Rank: 3

注册时间
2009-8-18
发表于 2009-11-18 17:24:40| 字数 20| - 中国–江苏–苏州 电信 | 显示全部楼层
现在9.10对TP的支持度应该是最好的了
敢问路在何方,路在脚下
世界上本来没有路,走的人多了,也就变成了路
叫兽=兽叫
农民工的我来了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Powered by Discuz! X3.5 © 2001-2023 Comsenz Inc

GMT+8, 2025-1-22 13:03 , Processed in 0.184256 second(s), 55 queries , Gzip On, OPcache On.

手机版|小黑屋|安卓客户端|iOS客户端|Archiver|备用网址1|备用网址2|在线留言|专门网

返回顶部