首先安装两个软件包:
sudo apt install xbindkeys
sudo apt install xautomation
然后在命令行输入xev | grep button
,这个是用来检测鼠标的键对应的编号,如下所示:
jia@jia:~$ xev | grep button
state 0x0, button 1, same_screen YES
state 0x100, button 1, same_screen YES
state 0x0, button 1, same_screen YES
state 0x100, button 1, same_screen YES
state 0x0, button 3, same_screen YES
state 0x400, button 3, same_screen YES
state 0x0, button 2, same_screen YES
state