Open MicaelJarniac opened 2 years ago
I've opened #179 with some ideas on how to make testing different browsers easier.
Interestingly on my Onyx Boox Note 2 both Chrome and Firefox (Fennec from F-Droid) support pressure, hover as well as video. As mentioned in another issue Firefox sadly considers the stylus as touch and not as pen input.
Interestingly on my Onyx Boox Note 2 both Chrome and Firefox (Fennec from F-Droid) support pressure, hover as well as video. As mentioned in another issue Firefox sadly considers the stylus as touch and not as pen input.
That's good to hear. I just tried Fennec here, and the results were the same as with Firefox for me; I got hover but no pressure.
My Galaxy Tab S8 should arrive today, so I'll test the browsers there as well.
Interestingly on my Onyx Boox Note 2 both Chrome and Firefox (Fennec from F-Droid) support pressure, hover as well as video. As mentioned in another issue Firefox sadly considers the stylus as touch and not as pen input.
On issue #74 it's mentioned that since Firefox treats the pen as touch, the pressure doesn't work, but you said you get pressure on Firefox, so did that change? What does that bug still affect?
The issue is not really about pressure but about touch and pen events being conflated. Desktop applications see the pen as a finger including some value for the pressure exerted. Applications like Xournal++, however, ignore the pressure component for touch events mostly (by default at least) and that's what may lead you to think that pressure is not working even though it is.
In short: Desktop apps treat pen and touch events differently but Firefox conflates them, leading to unexpected behavior.
The issue is not really about pressure but about touch and pen events being conflated. Desktop applications see the pen as a finger including some value for the pressure exerted. Applications like Xournal++, however, ignore the pressure component for touch events mostly (by default at least) and that's what may lead you to think that pressure is not working even though it is.
In short: Desktop apps treat pen and touch events differently but Firefox conflates them, leading to unexpected behavior.
If that's the case, I suppose a temporary workaround could be added to Weylus. An option that appears when the browser is Firefox, and if enabled, "transforms" touch events to pen events before sending them; that way the desktop app thinks it's a pen event with pressure.
Of course, this is far from ideal, but for the time being, I believe it could be of help.
I have tried Fennec and Vivaldi on my Samsung Galaxy Tab S6 lite with Android 12 and have made following observations:
Browser | Drawing/Stylus | Hover | Video | Button |
---|---|---|---|---|
Vivaldi | :white_check_mark: Yes | :x: No | :white_check_mark: Yes | :x: No |
Fennec | :x: No | :white_check_mark: Yes(Via Enable Touch/Mouse) | :white_check_mark: Yes | :x: No |
I hope this may help, since I would really like to see this work everywhere
I just tested with my Lenovo Tab M10 Plus with the Precision Pen 2. I also tested for multitouch gestures such as zoom/tilt canvas in Krita.
Browser | Finger drawing | Pen drawing / pressure | Multitouch | Hover | Video |
---|---|---|---|---|---|
Firefox | ✔ Yes | ✔ Yes / ✘ No | ✔ Yes | ✔ Yes | ✔ Yes |
Chrome | ✔ Yes | ✔ Yes / ✔ Yes | ✔ Yes | ✘ No | ✔ Yes |
Tested ONYX BOOX Tab Mini C with Weylus 0.11.4 running on a Linux Mint laptop:
Browser | Pressure | Hover | Video |
---|---|---|---|
NeoBrowser | ✅ Yes | ❌ No | ✅ Yes |
Firefox | ❌ No (everything treated as touch) |
✅ Yes | ✅ Yes |
Firefox Focus | ❌ No | ❌ No | ✅ Yes |
Chrome | ✅ Yes | ✅ Yes | ✅ Yes |
Microsoft Edge | ✅ Yes | ⚠️ Partial (often broke by toggling fullscreen, fixed by restarting browser) |
✅ Yes |
Overall Chrome had the most stable support.
Really glad I saw #142 so I knew to try different browsers, and really impressed with Weylus' capabilities! My ereader has now replaced my graphics tablet on the go. Incredible stuff.
(testing with help of https://notes.dt.in.th/PointerEventsTester )
Browser | pointerType | pressure | Tilt | Hover | Video |
---|---|---|---|---|---|
Boox's NeoBrowser | ✅ pen | ✅ Yes | ✅ Yes¹ | ❌ No | ✅ Yes |
Chrome 125 | ✅ pen | ✅ Yes | ✅ Yes¹ | ✅ Yes (partial tilt²) | ✅ Yes |
Microsoft Edge 124 | ✅ pen | ✅ Yes | ✅ Yes¹ | ✅ Yes (partial tilt²) | ✅ Yes |
Firefox 126 & Firefox Focus | ⚠️ mouse | ⚠️ Yes but only when moving | ❌ No | ✅ Yes | ✅ Yes |
EInkBro v11.3.1 | ✅ pen | ✅ Yes | ✅ Yes¹ | ❌ No | ✅ Yes, low FPS |
¹ All browsers that report tilt, no matter how I rotate the tablet, report +tiltY to the right, +tiltX (and azimuthAngle=0) in up direction (away from me), which sounds rotated to me, and IIUC doesn't agree with spec?
² During hover, these only report altitudeAngle
(ranging ~0.7 – 1.57 radians); azimuthAngle
is apparently not measured, reported fixed 1.57 radians (spec suggests 0?). Correspondingly, tiltX is fixed 0, tiltY reported but unsigned — and actually represents tilt in ANY direction (so I think it's derived from altitudeAngle).
However, would need more testing as what I really want to measure/optimize with this Boox device is:
These are the results far:
Samsung Galaxy Tab S8
ONYX BOOX Note Air
ONYX BOOX Note 2
(Fennec on F-Droid)
into touch events, and because of that, some
desktop applications will ignore pen pressure. #74