开箱即用,我可以使用手势来滚动和右键点击。我对三指手势非常感兴趣(比如用三个手指向上滑动以查看所有打开的窗口),但似乎没有办法让它们起作用。
我已经尝试过Extended Gestures GNOME-shell扩展和touchegg,但都没有成功。
有什么办法可以实现这些功能吗?
开箱即用,我可以使用手势来滚动和右键点击。我对三指手势非常感兴趣(比如用三个手指向上滑动以查看所有打开的窗口),但似乎没有办法让它们起作用。
我已经尝试过Extended Gestures GNOME-shell扩展和touchegg,但都没有成功。
有什么办法可以实现这些功能吗?
我在使用带有Ubuntu 18.04(X.org)的XPS 15。我成功地让多点触控手势对我起作用。Kohei Yamada开发了一个名为Fusuma的应用程序,可以在Linux上启用多点触控手势。如果尚未安装Ruby,您需要在您的机器上安装它。
按照 fusuma GitHub 的 Readme 页面 上的说明进行操作,或者您可以按照对我有效的以下步骤进行操作:
首先,请检查您当前的用户是否属于输入组。您可以通过以下方式进行检查:
groups $USER | grep -w input # To check
sudo gpasswd -a $USER input # To add
sudo apt install libinput-tools
sudo apt install xdotool
sudo apt install ruby
sudo gem install fusuma
这基本上是创建一个 .yml
文件,其中包含所需的配置。如果你想要标准手势,可以按照这些说明进行操作,或者随意调整以获得所需的手势。
前往你的主目录中的配置文件夹。
cd ~/.config
fusuma
的文件夹。mkdir fusuma
cd fusuma
config.yml
的文件。touch config.yml
nano config.yml
swipe:
3:
left:
command: 'xdotool key alt+Right'
right:
command: 'xdotool key alt+Left'
up:
command: 'xdotool key super'
down:
command: 'xdotool key super'
4:
left:
command: 'xdotool key ctrl+alt+Down'
right:
command: 'xdotool key ctrl+alt+Up'
up:
command: 'xdotool key ctrl+alt+Down'
down:
command: 'xdotool key ctrl+alt+Up'
pinch:
in:
command: 'xdotool key ctrl+plus'
out:
command: 'xdotool key ctrl+minus'
threshold:
swipe: 0.4
pinch: 0.4
interval:
swipe: 0.8
pinch: 0.1
sudo fusuma
在终端中不会发生任何事情。只需开始使用您的多点触控手势-在触摸板上滑动即可。
现在您只需要添加Fusuma以及其在启动应用程序中的命令。
fusuma
,然后重新启动以进行测试。sudo apt install libinput-tools ruby
sudo gem install fusuma
sudo apt install xdotool # Optional: For sending shortcuts
# Browser go forward (works only for Xorg, and Xwayland clients)
gesture swipe left 3 xdotool key alt+Right
# Browser go back (works only for Xorg, and Xwayland clients)
gesture swipe right 3 xdotool key alt+Left
sudo gem install fusuma
- macesudo fusuma
中不需要使用sudo
,并且在“添加到启动项”部分可以更加详细说明一下。 - arsaKasra