2

I have bound a button on my Wacom device like so:

xsetwacom --set "Wacom Cintiq 13HD touch Pad pad" button 8 key "]"

and when I press and hold the button, it only results in one key event. How do I fix this?

BrainStorm.exe
  • 227
  • 2
  • 9

1 Answers1

4

TL;DR

Sorry, don't have one of those yet... You can suggest an edit in this location for that.

This has to do with how xsetwacom parses the keys you give it. If you don't specify pressed (+) or released(-), and the key you are binding is not a modifier key, it assumes that you only want to press the key once. We can see this by investigating the properties of the device after we have set the binding. We can see this with xsetwacom -s --get "Wacom Cintiq 13HD touch Pad pad". It produces an output like this:

Property 'Wacom Tablet Area' does not exist on device.
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "1" "key +XF86Finance -XF86Finance "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "2" "+XF86WWW -XF86WWW "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "3" "+Control_L +s -s "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "8" "+bracketright -bracketright "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "9" "+bracketleft "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "10" "+Control_L +y -y "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "11" "+KP_Add -KP_Add "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "12" "+Control_L +z -z "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "13" "+KP_Subtract -KP_Subtract "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "ToolDebugLevel" "0"
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "TabletDebugLevel" "0"
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Suppress" "2"
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "RawSample" "4"
Property 'Wacom Pressurecurve' does not exist on device.
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Mode" "Absolute"
Property 'Wacom Hover Click' does not exist on device.
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Touch" "off"
Property 'Wacom Hardware Touch Switch' does not exist on device.
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Gesture" "off"
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "ZoomDistance" "0"
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "ScrollDistance" "0"
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "TapTime" "250"
Property 'Wacom Proximity Threshold' does not exist on device.
Property 'Wacom Rotation' does not exist on device.
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "RelWheelUp" "1" "button +5 "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "RelWheelDown" "2" "+4 "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "AbsWheelUp" "3" "+4 "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "AbsWheelDown" "4" "+5 "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "AbsWheel2Up" "5" "+4 "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "AbsWheel2Down" "6" "+5 "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "StripLeftUp" "1" "+4 "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "StripLeftDown" "2" "+5 "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "StripRightUp" "3" "+4 "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "StripRightDown" "4" "+5 "
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Threshold" "0"
xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "BindToSerial" "0"
Property 'Wacom Pressure Recalibration' does not exist on device.

If we look at the relevant line

xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "8" "+bracketright -bracketright "

you see that that button is bound to a single key press, but when you look at button 12 (that I bound earlier with the value "key ctrl z"):

xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "12" "+Control_L +z -z "

You see the modifier only has a plus on it. If we do this with the desired key using the key identifier from the settings output and only the press command, like so:

xsetwacom set "Wacom Cintiq 13HD touch Pad pad" "Button" "8" "key +bracketright "

then holding the button will cause the key to be pressed and held.


Notes:

You can pass the xinput id instead of the device's name. xsetwacom --list devices will get you the id, just keep in mind that the number might not be the same next time the system boots.

The -s in the echo command is so that it outputs bash commands to set the properties to their current value. Without the -s, the command will give you what you would need to put in the xorg.conf file to set the properties to their current values, and apparently, button bindings cannot be listed with that.

BrainStorm.exe
  • 227
  • 2
  • 9