mouse-actions能通过鼠标事件执行某些命令,如点击/滚动屏幕边角或绘制形状。
软件项目github地址是:https://github.com/jersou/mouse-actions
下载运行
安装包下载地址:https://github.com/jersou/mouse-actions/releases
需要具有 /dev/input/event* 的读写权限。检查 /dev/input/event* 文件组:
ls -al /dev/input/event*
#> crw-rw---- 1 root input /dev/input/event5
需要将当前用户添加到该组中,通常使用input或plugdev:
sudo usermod -a -G plugdev $USER
# or
sudo usermod -a -G input $USER
此外,必须具有 /dev/uinput 的读写权限,可以通过以下方式检查:
getfacl /dev/uinput
# ...
# user:<the current user>:rw-
# ...
如果用户没有此权限,请临时添加它:
sudo setfacl -m u:$USER:rw /dev/uinput
或者永久添加该权限:
sudo tee /etc/udev/rules.d/80-mouse-actions.rules <<<'KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput"'
需要重新启动系统才能应用这些更改。
再次检查用户组和 ACL:
$ groups
... input ...
$ getfacl /dev/uinput
# ...
# user:<the current user>:rw-
# ...