是的:
xinput set-button-map ID <button map>
Run Code Online (Sandbox Code Playgroud)
你在哪里找到ID通孔xinput list,这<button map>就是你要传递给的内容xmodmap。例如,我更换了 USB 鼠标上的按钮,但我不希望我的触控板变坏,我~/.Xmodmap以前看起来像这样:
pointer = 1 17 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 18 19 20 21 22 23 24
Run Code Online (Sandbox Code Playgroud)
但是使用它会更改所有指针设备,包括我的内置触控板,所以我知道xinputid 是 10,所以我运行这个:
xinput set-button-map 10 1 17 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 18 19 20 21 22 23 24
Run Code Online (Sandbox Code Playgroud)