我使用 Wacom Intuos Pro。它工作得很好。我尝试使用 pad 按钮像鼠标左键和右键一样工作。但我做不到。有人能帮我吗?
答案1
我有不同的平板电脑,但我使用这个脚本:
#!/bin/bash
#
# the darn thing change names if is on wireless or not...
#
device=$(xsetwacom --list | grep -i "pad" | awk '{print $(NF-2)}')
xsetwacom --set "$device" button 1 "key ctrl z"
xsetwacom --set "$device" button 3 "key shift ctrl s"
xsetwacom --set "$device" button 8 "key shift ctrl l"
echo "Ok --- all set on device $device."
exit 0
需要一点尝试才能找到按钮;我通常会使用一个脚本为每个键分配一个字母,然后在终端上点击进行检查,例如
xsetwacom --set "$device" button 1 "key 1"
xsetwacom --set "$device" button 2 "key 2"
... 等等。
手册上xsetwacom
说:
Button button-number [mapping] Set a mapping for the specified button-number. Mappings take the form of either a single numeric button or an 'action' to be per‐ formed. If no mapping is provided, the default mapping is restored. Numeric button mappings indicate what X11 button number the given button-number should correspond to. For example, a mapping of "3" means a press of the given button-number will produce as a press of X11 button 3 (i.e. right click).
因此,要将按钮 1 和 2(意外的示例)定义为鼠标左键和右键,您应该执行以下操作:
xsetwacom --set "$device" button 1 1
xsetwacom --set "$device" button 2 3
(未经测试,我的平板电脑在办公室)。