wizardpen
跳转到导航
跳转到搜索
wizardpen 是一个 X Window 的绘图板/数位板驱动,已知适用于UC-LOGIC Ugee Tablet。
安装
yaourt -S xf86-input-wizardpen
配置
Section "InputClass" Identifier "wizardpen" MatchProduct "UC-LOGIC Ugee Tablet" MatchIsTablet "on" MatchDevicePath "/dev/input/event*" # MatchTag "wizardpen" Driver "wizardpen" Option "SendCoreEvents" "true" Option "TopX" "28" Option "TopY" "0" Option "BottomX" "2047" Option "BottomY" "2000" EndSection
校准使用驱动附带的wizardpen-calibrate程序,需要 root 权限。其参数为设备文件路径。通过 ls -lh /dev/input/by-id
的名字来寻找,如:
usb-UC-LOGIC_Ugee_Tablet-event-mouse -> ../event17
按提示操作,将其输出写到 xorg 配置文件中。
多显示器的配置
使用 xinput 命令通过坐标变换矩阵将绘图板映射到多个显示器的某一个上。[1]需要对列表中的所有设备执行。下例中,两个显示器坐标分别为 1366x768+0+0
和 1920x1080+1366+0
(widthxheight+xoffset+yoffset),将其映射到后者上:
xinput set-prop 9 --type=float "Coordinate Transformation Matrix" 0.5843 0 0.4157 0 1 0 0 0 1
xinput set-prop 10 --type=float "Coordinate Transformation Matrix" 0.5843 0 0.4157 0 1 0 0 0 1
计算公式如下:[2]
- c0 = touch_area_width / total_width
- c1 = touch_area_x_offset / total_width
- c2 = touch_area_height / total_height
- c3 = touch_area_y_offset / total_height
变换矩阵为:
[ c0 0 c1 ] [ 0 c2 c3 ] [ 0 0 1 ]