如何使用 Thinkpad T440 触控板/触控板配置 Debian?

如何使用 Thinkpad T440 触控板/触控板配置 Debian?

我在尝试弄清楚如何使用 Linux 操作系统配置 Lenovo Thinkpad T440 触控板(“触控板”)时遇到了麻烦。我喜欢 Windows 配置笔记本电脑触控板的方式,并想在 Debian 上模仿它。

以下是一些规格:

操作系统是 Debian 7.7.0,运行 Gnome。

我遵循了本指南的部分内容:http://forums.debian.net/viewtopic.php?f=16&t=111298&p=528725&hilit=t440#p528725

并将此代码复制到 50-synapticconf 中:

# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option "OptionName" "value"
#
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
    Option "TapButton1" "1"
        Option "TapButton 2" "3"
        # uncommenting this should make three finger click the middle button
        # Option "TapButton 3" "2"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
        MatchDevicePath "/dev/input/event*"
EndSection

Section "InputClass"
        Identifier "touchpad ignore duplicates"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/mouse*"
        Option "Ignore" "on"
EndSection

# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "60% 0 0 5% 40% 60% 0 5%"
#       To disable the bottom edge area so the buttons only work as buttons,
#       not for movement, set the AreaBottomEdge
        Option "AreaTopEdge" "4%"
EndSection

# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Disable clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection

这是一张图片: 在此输入图像描述

目前它对上面的代码做了什么:左上角可以工作,但右侧按钮不行。触摸板的左下角可以工作,右侧也可以。此外,中键点击器在红线之间的顶部中间不起作用。我担心这些按钮,因为我想将指点杆与这三个按钮结合使用。

我打算做什么:

|LLLLLL MMMM  RRRRR|
|                  |
|                  |
|                  |
|                  |
|                  |
|LLLLLL      RRRRRR|

答案1

在我的 Thinkpad X240(同一代,相似但不一样烦人的触控板)上,我在我的 中调用以下 shell 脚本~/.Xsession

#!/bin/sh

# Configure the X240 ClickPad

# 1 finger = left click, 2 finger = right click, 3 finger = middle click
synclient TapButton2=3
synclient TapButton3=2
synclient ClickFinger2=3
synclient ClickFinger3=2

# enable horizontal two-finger scrolling (vertical is enabled by default)
synclient HorizTwoFingerScroll=1
synclient VertTwoFingerScroll=1

# Where does the touch pad end to leave the remainder as real buttons
synclient AreaTopEdge=2000

# Areas must not overlap or it throws BadValue errors
synclient MiddleButtonAreaLeft=3000
synclient MiddleButtonAreaRight=4049
synclient MiddleButtonAreaTop=0
synclient MiddleButtonAreaBottom=2000

synclient RightButtonAreaLeft=4050
synclient RightButtonAreaRight=0
synclient RightButtonAreaTop=0
synclient RightButtonAreaBottom=2000

synclient是 Debian 软件包的一部分xserver-xorg-input-synaptics

该脚本应该为您提供顶部边缘的按钮。我不知道是否也可以通过这种方式添加下边缘按钮,但SecondarySoftButtonAreas手册页中的提及synaptics(4)表明了这一点。 (不幸的是,我只能synaptics(4)在 Debian 8 Jessie 上找到该选项,但在 Debian 7 Wheezy 上找不到。在 Jessie 上,Thinkpad 型号 T440、T540 和 X240 在该上下文中明确提到。)

如果您的触控板使用不同的坐标或者您喜欢不同的按钮高度等,您可能需要调整一些值。

我非常确定这种设置触控板的方法也适用于该代的其他 Thinkpad 型号,因为我最初从一位拥有 T540 型号的朋友那里得到了类似的脚本。


顺便说一句:联想似乎终于明白了……40 代无按钮触控板是一个坏主意,而今年春天推出的下一代 Thinkpad 将再次拥有真正的拇指摇杆鼠标按钮。尽管我的 X240 使用还不到一年,但我确实正在考虑购买那一代的新 Thinkpad。 (恕我直言,这是该问题的真正解决方案。;-)

答案2

wayland/libinput维基百科上有一个专门的部分联想*40系列。功能失调的软按钮可能是坐标超出范围的症状(就像在E540系列);看在这里进行调整

一旦坐标范围固定,一个包罗万象的 Xorg conf 应该开箱即用,fi:

$ cat /etc/X11/xorg.conf.d/40-libinput.conf
# Match on all types of devices but tablet devices and joysticks
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "XkbModel" "thinkpad"
        Option "xkb_layout" "ch"
        Option "xkb_variant" "fr"
        Option "XkbOptions" "ctrl:nocaps,terminate:ctrl_alt_shift_bksp,compose:caps"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

在我的 E540 上,顶部和底部边缘都有 3 个按钮。

相关内容