在Ubuntu 18.04上禁用触摸板(暂时)

时间:2018-05-07 14:11:16

标签: ubuntu

我在System76 Oryx笔记本电脑上使用Ubuntu 16.04。触控板非常敏感,因此我习惯使用Fn + F1禁用它。这在18.04不再适用了。我环顾四周,发现:

synclient TouchpadOff=1 

当我设定它似乎工作一秒然后重置...

$ synclient TouchpadOff=0
$ synclient | grep TouchpadOff
    TouchpadOff             = 0
$ synclient | grep TouchpadOff
    TouchpadOff             = 1

我还发现:

xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0

但这似乎更永久。当我试图回到1时,它仍然关闭。似乎我现在需要重新启动以重新打开它。我曾经能够用Fn + F1切换。

5 个答案:

答案 0 :(得分:2)

您是否尝试过安装Touchpad Indicator

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator

它会

  • 使用指示器菜单或键盘快捷键禁用/启用触控板。

  • 插入鼠标时禁用触控板。

  • 禁用触控板 打字。

我认为这将解决"工作一秒钟的问题。问题

希望有所帮助

答案 1 :(得分:1)

我假设您由于触控板令人讨厌的滚动和单击行为而想禁用它(是的,我知道当您假设时会发生什么:您是用U和ME制作ASS的,但这并不是第一个。时间)。

我也刚刚从16.04升级到18.04,即使我在系统设置GUI中禁用了滚动和鼠标单击,我的触控板行为也看似是随机滚动和鼠标单击。

基本上,我只是希望能够使用触控板定位光标,而没有其他任何东西。这是我发现解决问题的方法。首先,从xinput获取设备ID:

% xinput list

您应该看到触控板及其ID。我的样子:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=13   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]

id = 12。使用以下命令列出触摸板特性:

%  xinput --list-props 12

相关属性是“双手指滚动”,“边缘滚动”和“点击时间”,分别具有属性ID 314、313和305。假设您的媒体资源ID与我的匹配,请使用以下命令将其禁用:

% xinput set-prop 12 305 0
% xinput set-prop 12 313 0 0 0 
% xinput set-prop 12 314 0 0

,现在您的触控板应该只提供鼠标指针的位置。如果您的财产ID不同,请使用您的财产ID。

答案 2 :(得分:1)

您可以使用以下命令创建自定义快捷方式:

<h1 style="color: red;">Test</h1>
<h1 style="color: green;">Test</h1>

此命令将切换Pointer设备。

如何创建快捷方式:

1-打开终端并找到设备:

gnome-terminal -- /bin/bash -c "file='/tmp/touch-disable'; id=$(xinput | grep YOUR_DEVICE_STRING | grep -o 'id=[0-9]\+' | grep -o '[0-9]\+'); if [ -f $file ]; then xinput enable $id; rm $file; else xinput disable $id; touch $file; fi"

2-打开Gnome设置/设备/键盘快捷键 Keyboard Settings

3-使用“ +”按钮添加新的快捷方式 Add Shortcut

4-复制描述的命令并替换“ YOUR_DEVICE_STRING”。例如:“ Synaptics TM3075-002”

5-为快捷方式命名并设置定义范围

说明:

要切换触摸板的启用/禁用状态,我们在/ tmp中创建一个文件作为标记,我们已禁用了指针设备。在第二次执行时,我们将删除文件,因此下次启动设备时我们就知道了。状态更改由xinput enable / disable归档。

这意味着该命令也可以作为示例:

$xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ HOLTEK USB Wireless Device                id=9    [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=14   [slave  pointer  (2)]
⎜   ↳ Synaptics TM3075-002                      id=13   [slave  pointer  (2)]  <-- this is my touchpad
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=12   [slave  keyboard (3)]

为了能够运行此命令,我们可以将gnome-terminal与bash shell配合使用。

答案 3 :(得分:0)

我很确定我们拥有来自System 76的Oryx Pro确切模型(模型:orxp1)。我注意到自安装Ubuntu 18.04以来“ Fn + F1”键盘快捷键停止工作的相同问题。我有一个可以恢复键盘快捷键行为的解决方案,它使我的生活变得更轻松。

首先,我必须运行以下命令(由于某种原因未在Ubuntu 18.04上安装该命令):

sudo apt install xserver-xorg-input-synaptics

然后重新启动。

一旦备份,键盘快捷键(Fn + F1)将再次起作用并且可以正确切换!由于我发现了此解决方案并看到它完美无缺,因此我想在这里共享它。希望这会有所帮助!

答案 4 :(得分:0)

试试这个:

$ xinput list
// here you see the ID of the TouchPad
$ xinput disable ID
// Replce ID of the number of devic