How to map graphics tablet button to Ctrl+= & Ctrl+-

I wrote a script to map my buttons:

#!/bin/sh                                                                                                                                                                                                                                    
xsetwacom --set 'HID 256c:006d Pad pad' Button 1 "key ["                                                                                                                                                                   
xsetwacom --set 'HID 256c:006d Pad pad' Button 2 "key ]"                                                                                                                                                                                   
xsetwacom --set 'HID 256c:006d Pad pad' Button 3 "key +ctrl += -= -ctrl"                                                                                                                                                                                   
xsetwacom --set 'HID 256c:006d Pad pad' Button 8 "key +ctrl +- -- -ctrl"                                                                                                                                                                                   
xsetwacom --set 'HID 256c:006d Pad pad' Button 9 "key ctrl +z -z -ctrl"                                                                                                                                                                                   
xsetwacom --set 'HID 256c:006d Pad pad' Button 10 "key +shift +ctrl +z -z -ctrl -shift"                                                                                                                                                                                  
xsetwacom --set 'HID 256c:006d Pad pad' Button 11 "key ctrl +c -c -ctrl"                                                                                                                                                                                  
xsetwacom --set 'HID 256c:006d Pad pad' Button 12 "key ctrl +v -v -ctrl" 

When I run it I get the following error:

❯ ./tab.sh
Invalid key '+='.
Cannot parse keyword '+=' at position 3
Invalid key '+-'.
Cannot parse keyword '+-' at position 3

How do I map it to Ctrl+=, and Ctrl+-?
All the other mappings work fine.
Thanks

This should do it. :slight_smile:

xsetwacom --set 'HID 256c:006d Pad pad' Button 1 "key ["                                                                                                                                                                   
xsetwacom --set 'HID 256c:006d Pad pad' Button 2 "key ]"                                                                                                                                                                                   
xsetwacom --set 'HID 256c:006d Pad pad' Button 3 "key +ctrl = -ctrl"                                                                                                                                                                                   
xsetwacom --set 'HID 256c:006d Pad pad' Button 8 "key +ctrl - -ctrl"                                                                                                                                                                                   
xsetwacom --set 'HID 256c:006d Pad pad' Button 9 "key +ctrl z -ctrl"                                                                                                                                                                                   
xsetwacom --set 'HID 256c:006d Pad pad' Button 10 "key +shift +ctrl z -ctrl -shift"                                                                                                                                                                                  
xsetwacom --set 'HID 256c:006d Pad pad' Button 11 "key +ctrl c -ctrl"                                                                                                                                                                                  
xsetwacom --set 'HID 256c:006d Pad pad' Button 12 "key +ctrl v -ctrl" 

Try use GUI for it ?

I tried that, but it didn’t work because I use a Huion tab, that’s why I used the script.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.