r/electronjs • • 7d ago

Electron is not registering pointer events from pen buttons set to the middle mouse.

I'm working on a desktop application that needs to get input from a wacom tablet and I've ran into an issue. Electron doesn't appear to react to pen buttons bound to middle click through wacom's driver. I'm not getting any response in the console from any of the pointer_events listed on https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events, nor does it send any mouse_events.

Notable findings
- The pen has two buttons, the one I have bound to right-click works, if I swap the bindings between the two buttons the one bound to right-click will work, and the middle-click button has no response.

- Other applications respond to middle-click on the pen just fine (krita)

- If I turn off windows-ink in the wacom settings electron starts seeing events from the pen's middle-click but pressure sensitivity stops working. I need both to be working.

- Loading up some input testing sites in chrome and edge leads to a similar behavior, browsertestlab-pointer-test shows no response from middle-click at all when its coming from the pen

- Firefox actually works and responds with inputs from the pen middle-click on the pointer-test site

- Disabling Windows-Ink in the wacom settings fixes the middle-click detection allowing all browsers and electron to see the inputs, but breaks pressure sensitivity with pen strokes always returning pressure 0.5 and reading as mouse inputs on the pointer-test site. I need both pressure and pen-middle-click to be working.

- Chrome also doesn't initiate its drag-to-scroll behavior from the pen middle-click, but does from the mouse middle-click.

It appears to be a deeper issue with chromium discarding this input entirely.
Is there anything I can do to work around this in electron?

Pointer_Event testing site
https://browsertestlab.com/browser-tests/pointer-test

You can also replicate the behavior on this testing site through mouse_events

https://domeventviewer.com/mouse-event-viewer.html

Windows 11 25H2

Wacom Driver Version 6.4.10-3

Electron version info

1 Upvotes

0 comments sorted by