我可以在鼠标设置中找到一个选项,将拖放时间阈值调到非常小,这有助于处理意外事件,但我找不到完全禁用它的选项。
答案1
这是一个老话题,但我会看看我是否可以在这里回答。我刚买了一台装有 Ubuntu 20.04 的 Dell XPS 13,新的 Gnome UI 没有界面。如果你的有,简单的方法是检查触摸板设置并禁用单击拖动。如果没有,你应该做的是查找你的 xinput 属性:
$ xinput list
您应该看到如下输出:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ DLL096D:01 06CB:CDE6 Mouse id=12 [slave pointer (2)]
⎜ ↳ DLL096D:01 06CB:CDE6 Touchpad id=13 [slave pointer (2)]
⎜ ↳ Wacom HID 4943 Finger touch id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Integrated_Webcam_HD: Integrate id=9 [slave keyboard (3)]
↳ Intel HID events id=14 [slave keyboard (3)]
↳ Intel HID 5 button array id=15 [slave keyboard (3)]
↳ Integrated_Webcam_HD: Integrate id=10 [slave keyboard (3)]
↳ Dell WMI hotkeys id=16 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Video Bus id=6 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=17 [slave keyboard (3)]
↳ Sleep Button id=8 [slave keyboard (3)]
在我的例子中,正确的 ID 是 13,所以让我们看看这些道具:
$ xinput list-props 13
再次,输出如下所示:
Device 'DLL096D:01 06CB:CDE6 Touchpad':
Device Enabled (148): 1
Coordinate Transformation Matrix (150): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Tapping Enabled (321): 1
libinput Tapping Enabled Default (322): 0
libinput Tapping Drag Enabled (323): 1
libinput Tapping Drag Enabled Default (324): 1
libinput Tapping Drag Lock Enabled (325): 0
libinput Tapping Drag Lock Enabled Default (326): 0
libinput Tapping Button Mapping Enabled (327): 1, 0
libinput Tapping Button Mapping Default (328): 1, 0
libinput Natural Scrolling Enabled (305): 1
libinput Natural Scrolling Enabled Default (306): 0
libinput Disable While Typing Enabled (329): 1
libinput Disable While Typing Enabled Default (330): 1
libinput Scroll Methods Available (307): 1, 1, 0
libinput Scroll Method Enabled (308): 1, 0, 0
libinput Scroll Method Enabled Default (309): 1, 0, 0
libinput Click Methods Available (331): 1, 1
libinput Click Method Enabled (332): 0, 1
libinput Click Method Enabled Default (333): 1, 0
libinput Middle Emulation Enabled (334): 0
libinput Middle Emulation Enabled Default (335): 0
libinput Accel Speed (312): 0.301471
libinput Accel Speed Default (313): 0.000000
libinput Left Handed Enabled (317): 0
libinput Left Handed Enabled Default (318): 0
libinput Send Events Modes Available (268): 1, 1
libinput Send Events Mode Enabled (269): 0, 0
libinput Send Events Mode Enabled Default (270): 0, 0
Device Node (271): "/dev/input/event10"
Device Product ID (272): 1739, 52710
libinput Drag Lock Buttons (319): <no items>
libinput Horizontal Scroll Enabled (320): 1
在我的例子中,您可以看到它的属性 323,名为 libinput Tapping Drag Enabled (323): 1。值 1 表示它已启用。因此,您的目标是将其关闭。使用名称来做到这一点更容易。您将获取设备的名称以及其中的属性,最后将其设置为 0。对我来说,这就是
$ xinput set-prop "DLL096D:01 06CB:CDE6 Touchpad" "libinput Tapping Drag Enabled" 0