禁用捏合/缩放 Logitech K400 键盘触控板

禁用捏合/缩放 Logitech K400 键盘触控板

在 K400 上滚动或使用触摸板时,手指发热或意外擦过的情况经常发生,从而激活捏合和缩放功能。但是这些功能与键码 37 绑定(通常是 Control。我已将 Control_L 换成了 Super_L)。需要让触摸板完全停止捏合和缩放功能,以便不再与键码 37 绑定。Ubuntu 14.04。谢谢。

xinput 列表属性 9

Device 'Logitech K400':
Device Enabled (151):   1
Coordinate Transformation Matrix (153): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (278): 0
Device Accel Constant Deceleration (279):   1.000000
Device Accel Adaptive Deceleration (280):   1.000000
Device Accel Velocity Scaling (281):    10.000000
Device Product ID (267):    1133, 16459
Device Node (268):  "/dev/input/event12"
Evdev Axis Inversion (282): 0, 0
Evdev Axes Swap (284):  0
Axis Labels (285):  "Rel X" (161), "Rel Y" (162), "Rel Horiz Wheel" (276), "Rel Dial" (301), "Rel Vert Wheel" (277)
Button Labels (286):    "Button Left" (154), "Button Middle" (155), "Button Right" (156), "Button Wheel Up" (157), "Button Wheel Down" (158), "Button Horiz Wheel Left" (159), "Button Horiz Wheel Right" (160), "Button Side" (271), "Button Extra" (272), "Button Forward" (273), "Button Back" (274), "Button Task" (275), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270)
Evdev Scrolling Distance (287): 1, 1, 1
Evdev Middle Button Emulation (288):    0
Evdev Middle Button Timeout (289):  50
Evdev Third Button Emulation (290): 0
Evdev Third Button Emulation Timeout (291): 0
Evdev Third Button Emulation Button (292):  3
Evdev Third Button Emulation Threshold (293):   0
Evdev Wheel Emulation (294):    0
Evdev Wheel Emulation Axes (295):   0, 0, 4, 5
Evdev Wheel Emulation Inertia (296):    10
Evdev Wheel Emulation Timeout (297):    200
Evdev Wheel Emulation Button (298): 4
Evdev Drag Lock Buttons (299):  0

xin输入测试 9

key release 37 
key press   37 

KeyRelease event, serial 37, synthetic NO, window 0x6000001,
    root 0x2a4, subw 0x0, time 79761120, (368,436), root:(368,488),
    state 0x840, keycode 37 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

答案1

我认为这里发生的事情是,键盘在运动轴 #4 上发送鼠标事件,然后将其解释为滚轮事件。插入左控制键是为了区分双指滚动和双指捏合(没有控制键时会滚动,有控制键时会缩放)。

当然,当网页到处放大和缩小时,所有这些都完全没用,而且相当烦人,因为那些双指事件总是会意外触发。幸运的是……Linux 可以简单地被告知忽略运动轴 #4 上的事件,这就是结局。我相信这将适用于所有系统,包括 Ubuntu……但如果有人想测试,请务必更新我。

#!/bin/sh

XIN=/usr/bin/xinput
DEV1="pointer:Logitech USB Receiver"
DEV2="pointer:Logitech K400"

for DEV in "$DEV1" "$DEV2"
do
    MOUSEID=$($XIN --list --id-only "$DEV" 2>/dev/null)
    if [ -n "$MOUSEID" ]
    then
        echo "ID $MOUSEID is $DEV"

        # This disables the button 4 and button 5 which emulate scroll wheel.
        $XIN set-button-map "$MOUSEID" 1 2 3 0 0 0 0 0

        # This disables the translation from motion a[4] events into Wheel emulation.
        $XIN set-prop "$MOUSEID" --type=int --format=8 "Evdev Wheel Emulation Axes" 0, 0, 0, 0
    fi
done

请注意,如果您拔下 Logitech USB 加密狗并重新插入,则设置将重置为默认值,您需要再次运行脚本。我确信有办法将这些更改纳入系统默认值,但这对我来说已经足够了。出于某种原因,我的设备名称与原始问题不同,我的无线加密狗的属性中带有“设备产品 ID (272):1133, 50475”,因此可能有很多类似的设备。

答案2

现在有一款名为 Solaar 的优秀软件可以管理 Logitech 设备:https://pwr-solaar.github.io/Solaar/

sudo apt install solaar
solaar

然后您可以通过 GUI 禁用捏合缩放功能。

答案3

页面回答你的问题?K400 上有一些特殊功能可以通过 FN + 触摸板使用

答案4

我刚刚了解到,如果按住 Fn + 用一根手指在触摸板上,就可以向 4 个方向滚动。

CTRL + Fn + 单指向上或向下放大/缩小。

基本上永远不要用两根手指在触摸板上操作,否则你会遇到麻烦 - 请使用 Fn + 单根手指来模拟两根手指的功能。

当然,用一根手指捏是不可能的。;)

相关内容