xsetwacom - commandline utility to query and modify wacom driver settings.
xsetwacom [options] [command [arguments]]
This program queries or changes properties on the devices loaded by the wacom driver. The modification of properties happens at runtime and is not persistent through X server restarts.
Allowed commands are list, get, and set. The command may be specified with or without one or two preceding dashes, i.e. --list is equivalent to -list and list.
Not all parameters are available on all tools. Use the get command with the parameter or "all" parameter for specific input tool applicable parameters and current settings.
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 a press of X11 button 3 (i.e. right click).
Action mappings allow button presses to perform many events. They take the form of a string of keywords and arguments.
The "key" keyword is followed by a list of key names. These can optionally be preceded by "+" for press and "-" for release. If +/- is not given, press-and-release is assumed, except for modifier keys which are left pressed. Key names can be X11 KeySyms or some aliases such as 'shift' or 'f1' (the full list can be seen with the list modifiers command).
To assign a key that is not in the modifiers list, use the KeySym in /usr/include/X11/keysymdef.h with the XK_ prefix removed or its actual value as is. For example, XK_BackSpace should be specified as "BackSpace". "0xff80" can also be used to replace "BackSpace" since it's the unique KeySym value of Backspace key.
Here is a combined example: "key +a shift b shift -a 0xff0d" converts the button into a series of keystrokes. In this example, "press a, press shift, press and release b, release shift, release a, then press and release enter". "key +a +shift b -shift -a 0xff0d" does the same thing.
The "button" keyword is similar except that its arguments are X11 button numbers.
The "modetoggle" keyword is also recognized; it takes no arguments, and toggles the device mode between relative and absolute pointer tracking.
The "pan" keyword causes the driver to send scroll events while the pen is dragged. This makes it easy to scroll through lists and documents, pan around 2D canvases, and zoom in/out of 3D scenes (exact behavior depends on application interpretation of scrollwheel events). Dragging the pen up/down will send scrollwheel down/up events; dragging it left/right will send scrollwheel right/left events.
The events in the action mapping are sent when the physical button is pressed. If the action mapping leaves any buttons or keys pressed (such as a modifier key), they will be released when the physical button is released.
Multiple keywords may be present in one action if desired: for example "key +ctrl button 5 key -ctrl". Each keyword takes all arguments until the next keyword.
A maximum of 256 presses and/or releases can be specified in an action mapping.
The driver can only simulate physical key events but not keysyms and xsetwacom translates the mapping sequence into such events. Thus, symbols on the same physical key will generate the same event. For example, '1' and '!' are on the same key on a US keyboard and thus have the same keycode). For access to keys on a higher shift level, the sequence should be entered as it would be typed on a physical keyboard. For example, a exclamation mark is entered by the sequence of "key +shift 1 -shift".
The output mapping configuration is a onetime setting and does not track output reconfigurations; the command needs to be re-run whenever the output configuration changes. When used with tablet rotation, the tablet must be rotated before it is mapped to the new screen. This parameter is write-only and cannot be queried.
Rotation is a tablet-wide option: rotation of one tool affects all other tools associated with the same tablet. When the tablet is physically rotated, rotate any tool to the corresponding orientation. Default: none
This tool provides access to the device properties implemented in the xf86-input-wacom X server input module. It does not work under a Wayland compositor as the input module is not active.
More information is available at https://github.com/linuxwacom/xf86-input-wacom