首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何用xsetwacom将“鼠标滚轮”映射到Wacom图形平板电脑的快速按钮?

如何用xsetwacom将“鼠标滚轮”映射到Wacom图形平板电脑的快速按钮?
EN

Ask Ubuntu用户
提问于 2020-01-02 20:29:32
回答 1查看 2.8K关注 0票数 3

我使用的是"Wacom“图形平板电脑,Ubuntu18.04下有4个可编程的快速按钮。说电脑有两个屏幕。

我喜欢分配两个按钮的图形平板的动作“鼠标滚轮向上”和“鼠标滚轮向下”。我的目标是在没有鼠标的情况下进行缩放。

因此我决定..。

  • ..。平板电脑组件的名字。#获取平板组件的列表xsetwacom --列出设备: Wacom Intuos BT S Pad pad id: 12类型: PAD Wacom Intuos BT S Pen手写笔id: 13类型:手写笔Wacom Intuos BT S橡皮擦id: 14 type:橡皮擦Wacom Intuos BT和Pen光标id: 15类型:游标类型
  • ..。鼠标动作的数字表示。#显示鼠标事件xev -event按钮#鼠标滚轮下ButtonPress事件.按钮4 ..。ButtonRelease事件..。按钮4 .鼠标启动ButtonPress事件.按钮5 ..。ButtonRelease事件..。按钮5 ..。

根据我的理解,下面的命令应该将“鼠标滚轮向下”的动作分配给图形平板的第三个按钮。不幸的是,情况似乎并非如此。

代码语言:javascript
复制
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 1Button 2Button 3映射到平板的第一个、第二个和第三个按钮。(至少我的测试表明了这一点。)

此命令是bash脚本的一部分:

代码语言:javascript
复制
#!/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

有人能告诉我我做错了什么吗?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2020-01-09 00:57:37

我决定使用+- (从numpad)代替mouse wheel up / down。这些键被许多程序用来在没有鼠标的情况下进行缩放。

代码语言:javascript
复制
# 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"
票数 2
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1200248

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档