Barrel button/pen input conflict (Huion Kamvas Pro 16, 2019 model)

I’ve got everything else working just how I like it, thanks to Digimend and xsetwacom, but for whatever reason, clicking the lower barrel button on my pen is sending the same event as actually touching the tip to the screen, so that rebinding the button also changes the input from the tip. Is there any way to fix this?

See here

1 Like

Setting the keybinds isn’t the problem, the problem is that it interprets “touching the pen tip to the screen” and “pressing the first barrel button” as the same input.

On my end the Tip is Left Mouse Button, and that is normal, the first “barrel” button is Button2 and is set to Middle Mouse

Since i use KDE Plasma and a Wacom i have this options

Those settings should be available too in the UI applications i mentioned, or if you prefer using xsetwacom then each button (including those on the stylus) can be remapped, and instead of Left Mouse Click, set the first “barrel button” aka Button2 on stylus to be Middle Mouse Click.

1 Like

You aren’t listening.

If I rebind the button, it rebinds the tip.

If I rebind the tip, it rebinds the button.

They are being treated as the same input event.

I cannot make this any more clear.

I’ll ignore that for now …

Only if you did something that goes against the default configuration files and driver.
Share the content of the files that have tablet and/or wacom in their name from:
/usr/share/X11/xorg.conf.d/
and
/etc/X11/xorg.conf.d/

In principle you should see something like this if you indeed used the digimend with xsetwacom functionality :

Section "InputClass"
    Identifier "Huion on wacom"
    MatchProduct "HUION"
    MatchDevicePath "/dev/input/event*"
    Driver "wacom"
EndSection

I’ll give you an example of why that should be not possible, from my end The stylus has an ID that can be also seen with the use of xinput

xinput list
⎜   ↳ Wacom Cintiq 22HD Pad pad                 id=12   [slave  pointer  (2)]
⎜   ↳ Wacom Cintiq 22HD Pen stylus              id=13   [slave  pointer  (2)]
⎜   ↳ Wacom Cintiq 22HD Pen eraser              id=14   [slave  pointer  (2)]

With that ID i can see the props for it and in this case is id=13 … so:

xinput list-props "13"
        Wacom Button Actions (654):     "Wacom button action 0" (655), "Wacom button action 1" (656), "Wacom button action 2" (657), "None" (0), "None" (0), "None" (0), "None" (0), "Wacom button action 3" (658)
        Wacom button action 0 (655):    1572865
        Wacom button action 1 (656):    1572866
        Wacom button action 2 (657):    1572867
        Wacom button action 3 (658):    1572872

even tho the props is longer, i focus only on the buttons part, and even tho i did not mentioned it previously, it includes the eraser tip too, and also the numbering goes like this compared to the UI settings
button action 0 is button 1 in UI
button action 1 is button 2 in UI
button action 2 is button 3 in UI
button action 3 is the eraser tip i did not mentioned before but has the settings …

Now, the action number is different for each, as you can see, and even tho is not the same number for the event, each should be totally different by default. All documented in the libinput (that are used by all drivers)

Emphasis on the unrelated and the reason for that is to avoid a situation like yours, reason why i had to make sure what you say is really the case. If not the config files are the reason for your issue, then the only valid an logical possibility is a faulty Stylus.

1 Like

So, I’m noticing two problems.

#1, based on comments like “this shouldn’t be possible,” you’re assuming—as in, concluding without any evidence—that I’m making things up. Not very nice.

#2, you’re coming at this from a Wacom user’s perspective. Please keep in mind that Wacom is far better supported than Huion in the Linux ecosystem, which is why most GUI-based tools don’t even work with Huion tablets. I’m not exclusively using xsetwacom out of any love for it, I’m using it because it’s my only option.

It is probably also worth mentioning that neither Digimend nor OpenTabletDriver officially support my model of tablet. If no solutions can be found here, I’ll happily take it up with someone working on one of those.

Now, thing is, I don’t HAVE any tablet-related configs in xorg.conf.d, partly because I haven’t been able to sort out this problem yet, and partly because, aside from this and needing to manually set MapToOutput every time I reconnect to keep the cursor on the tablet’s screen when I use my stylus, it basically works out of the box. I can paste the output from xinput though.

(DeathNote prabs|~) -> xinput list
⎜   ↳ HID 256c:006d stylus                    	id=9	[slave  pointer  (2)]
⎜   ↳ HID 256c:006d Pad pad                   	id=10	[slave  pointer  (2)]
⎜   ↳ HID 256c:006d Touch Strip pad           	id=11	[slave  pointer  (2)]

(DeathNote prabs|~) -> xinput list-props "9"
Device 'HID 256c:006d stylus':
	Wacom Tool Type (323):	"STYLUS" (300)
	Wacom Button Actions (324):	"Wacom button action 0" (325), "Wacom button action 1" (326), "Wacom button action 2" (327), "None" (0), "None" (0), "None" (0), "None" (0), "Wacom button action 3" (328)
	Wacom button action 0 (325):	1572865
	Wacom button action 1 (326):	1572866
	Wacom button action 2 (327):	1572867
	Wacom button action 3 (328):	1572872

(DeathNote prabs|~) -> xinput list-props "10"
Device 'HID 256c:006d Pad pad':
	Wacom Tool Type (323):	"PAD" (332)
	Wacom Button Actions (324):	"Wacom button action 0" (325), "Wacom button action 1" (326), "Wacom button action 2" (327), "None" (0), "None" (0), "None" (0), "None" (0), "Wacom button action 3" (328), "Wacom button action 4" (333), "Wacom button action 5" (334), "Wacom button action 6" (335), "Wacom button action 7" (336), "Wacom button action 8" (337), "Wacom button action 9" (338), "Wacom button action 10" (339), "Wacom button action 11" (340), "Wacom button action 12" (341)
	Wacom button action 0 (325):	1572865
	Wacom button action 1 (326):	1572866
	Wacom button action 2 (327):	1572867
	Wacom button action 3 (328):	1572872
	Wacom button action 4 (333):	1572873
	Wacom button action 5 (334):	1572874
	Wacom button action 6 (335):	1572875
	Wacom button action 7 (336):	1572876
	Wacom button action 8 (337):	1572877
	Wacom button action 9 (338):	1572878
	Wacom button action 10 (339):	1572879
	Wacom button action 11 (340):	1572880
	Wacom button action 12 (341):	1572881

(DeathNote prabs|~) -> xinput list-props "11"
Device 'HID 256c:006d Touch Strip pad':
	Wacom Tool Type (323):	"PAD" (332)
	Wacom Button Actions (324):	"Wacom button action 0" (325)
	Wacom button action 0 (325):	1572865

The stylus isn’t faulty, because this behavior only started after I switched to Manjaro. On the other hand, libinput did have some problems just the other day. I had to reinstall it to get the touchpad on my laptop working again. Could very easily be a problem there, but that’s way above my ability to diagnose.

Is clear what i stated:

Reason why i asked to share them, and:

I never insinuated by any words that you make things up. Is the second time you actually are the one pretending of “reading my mind” and accusing me of not doing, or doing something that for you is not nice.
Seriously?

I come as a Manjato Team member, then as a user
You can use xsetwacom only because once you make the huion driver to use it, your tablet becomes as a wacom device, reason why you get

in your xinput.

There is the problem then, as is guessed the first time. Let me remind you

When you install the drivers the proper way, they do create a config and i already mentioned what should contain; at least those lines. Is true it can be called 50-digimend.conf - depending how you installed the driver. So, you could have in /usr/share/X11/xorg.conf.d/50-huion.conf or /usr/share/X11/xorg.conf.d/50-digimend.conf with this complete config lines:

Section "InputClass"  
    Identifier "Huion class"  
    MatchProduct "HUION"  
    MatchIsTablet "on"  
    MatchDevicePath "/dev/input/event*"  
    Driver "wacom"  
EndSection  

Section "InputClass"  
    Identifier "Huion buttons"  
    MatchProduct "HUION"  
    MatchIsKeyboard "on"  
    MatchDevicePath "/dev/input/event*"  
    Driver "evdev"  
EndSection  

Section "InputClass"  
    Identifier "Huion scroll"  
    MatchProduct "HUION"  
    MatchIsPointer "off"  
    MatchIsKeyboard "off"  
    MatchIsTouchpad "off"  
    MatchIsTablet "off"  
    MatchIsTouchscreen "off"  
    MatchDevicePath "/dev/input/event*"  
    Driver "evdev"  
EndSection

If no config is present, then you create it. In some cases you have to install the xf86-input-wacom and that will create the /usr/share/X11/xorg.conf.d/70-wacom.conf - not useful for your case, but a good model to create a config for other tablets, as exemplified above.

Reason why i offered my help in the first place.
Also, depending on some circumstances that i will not start to enumerate here and now, you have to use the id of the tablet in the config. Since your tablet has 256c:006d then the config will look something like this, and will have the Section entries a bit different:

Section "InputClass"
    Identifier "Huion Stylus"
    #MatchProduct "HUION"
    #MatchIsTablet "on"
    MatchDevicePath "/dev/input/event*"
    MatchUSBID "256c:006d"
    Driver "wacom"
EndSection

Section "InputClass"
    Identifier "Huion Buttons"
    #MatchProduct "HUION"
    MatchUSBID "256c:006d"
    MatchIsKeyboard "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
EndSection

Section "InputClass"
    # Not Working.
    Identifier "Huion Scroll"
    #MatchProduct "HUION"
    MatchUSBID "256c:006d"
    MatchIsPointer "off"
    MatchIsKeyboard "off"
    MatchIsTouchpad "off"  
    # I think MatchIsTouchpad needs to be on.
    MatchIsTablet "off"
    MatchIsTouchscreen "off"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
EndSection

Since this was the case back in 2018, i don’t think you have to use the ID anymore, but once again, it depends.
The first config should work.

If the issue you have is persisting still, then

xsetwacom --set "$tabletstylus" Button 0 0  
xsetwacom --set "$tabletstylus" Button 1 1 
xsetwacom --set "$tabletstylus" Button 2 2   
xsetwacom --set "$tabletstylus" Button 3 3 

should default the buttons to work as per xinput action …

First conf didn’t work. Second conf works, but it’s still treating the side button and the tip as the same button.

xsetwacom also insists 0 is not a valid button number, and since neither the tablet nor the stylus actually report a name—I’m guessing that’s because they’re not officially supported by the driver—"$tabletstylus" just returns an empty string.

Not sure why it only let me quote the second code block and not your entire post, but that’s neither here nor there.

Out of ideas, so maybe better see some of the issues or open an issue here

and/or here for the libwacom as they also talk about same model

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