我使用的是"Wacom“图形平板电脑,Ubuntu18.04下有4个可编程的快速按钮。说电脑有两个屏幕。
我喜欢分配两个按钮的图形平板的动作“鼠标滚轮向上”和“鼠标滚轮向下”。我的目标是在没有鼠标的情况下进行缩放。
因此我决定..。
根据我的理解,下面的命令应该将“鼠标滚轮向下”的动作分配给图形平板的第三个按钮。不幸的是,情况似乎并非如此。
xsetwacom set "Wacom Intuos BT S Pad pad" Button 3 4
# I also tried:
xsetwacom set "Wacom Intuos BT S Pad pad" Button 3 "button 4"这个答案表示要重新显示快捷键的数值是: 1、3、8、9(从左到右)。我的平板电脑型号就不是这样了。Button 1、Button 2和Button 3映射到平板的第一个、第二个和第三个按钮。(至少我的测试表明了这一点。)
此命令是bash脚本的一部分:
#!/bin/bash
#coding:utf8
main_screen="HEAD-0"
bezier_args="0 20 80 100"
positioning_mode="Absolute"
# Maps the graphics tablet to the area of a specified screen (for multiple-screen environments).
xsetwacom set "Wacom Intuos BT S Pen stylus" MapToOutput "$main_screen"
xsetwacom set "Wacom Intuos BT S Pen eraser" MapToOutput "$main_screen"
# Changes the pressure sensitivity.
xsetwacom set "Wacom Intuos BT S Pen stylus" PressureCurve "$bezier_args"
xsetwacom set "Wacom Intuos BT S Pen eraser" PressureCurve "$bezier_args"
# Specifies the positioning mode ("Absolute" / "Relative")
xsetwacom set "Wacom Intuos BT S Pen stylus" Mode "$positioning_mode"
xsetwacom set "Wacom Intuos BT S Pen eraser" Mode "$positioning_mode"
# Assigns actions to the tablet buttons.
xsetwacom set "Wacom Intuos BT S Pad pad" Button 1 "key +ctrl z -ctrl"
xsetwacom set "Wacom Intuos BT S Pad pad" Button 2 "key +ctrl +shift z -ctrl -shift"
xsetwacom set "Wacom Intuos BT S Pad pad" Button 3 4
exit 0有人能告诉我我做错了什么吗?
发布于 2020-01-09 00:57:37
我决定使用+和- (从numpad)代替mouse wheel up / down。这些键被许多程序用来在没有鼠标的情况下进行缩放。
# Numpad '+'
xsetwacom set "Wacom Intuos BT S Pad pad" Button 3 "key 0xffab"
# Numpad '-'
xsetwacom set "Wacom Intuos BT S Pad pad" Button 8 "key 0xffad"https://askubuntu.com/questions/1200248
复制相似问题