Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on Mouse Left Pressed until Pen Touch #8

Open
FranciscoTosi opened this issue Dec 2, 2024 · 14 comments
Open

Stuck on Mouse Left Pressed until Pen Touch #8

FranciscoTosi opened this issue Dec 2, 2024 · 14 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@FranciscoTosi
Copy link

When I touch the tablet with my hand instead of the pen, it sends a mouse left pressed signal, but it does not send a release when I stop. This means that I cannot left click until I touch the tablet with the pen. Once I do, it is fixed until the next time I use touch.

Happy to provide any necessary info.

@Mrcubix
Copy link
Owner

Mrcubix commented Dec 2, 2024

I doubt this is an issue with my plugin, what is your binding set to.
Also what filters are you using.

A diagnostic would be appreciated (Help > Export Diagnostics in the UX)

@Mrcubix
Copy link
Owner

Mrcubix commented Dec 2, 2024

Also have you tried the new version (1.1.8), which is awaiting some checks before being submitted to the plugin repo

@FranciscoTosi
Copy link
Author

You mean the tip binding? If so it is set to left mouse button. I can set it to nothing but then I am unable to release the left button from touch.
Touch works normally when using the default driver instead of OTD. It could be an OTD problem maybe.
The only filter is Touch Settings. This happens whether it's enabled or disabled.
Here's a diagnostic:
diagnostic.json

I did not try the new version, I can check today.

@Mrcubix
Copy link
Owner

Mrcubix commented Dec 2, 2024

Could you try using Touch Gestures (Available in the plugin manager) instead of using left click in the UX?

Installation guide available at wiki link or on the repo's README

There is no hover for touch, so there is no way to prevent it from left clicking when you don't want it to.

@Mrcubix Mrcubix added bug Something isn't working help wanted Extra attention is needed labels Dec 2, 2024
@Mrcubix
Copy link
Owner

Mrcubix commented Dec 2, 2024

Issue identified, no ETA for a fix cause i have absolutely no idea on how to fix it

(_convertedReport as TouchConvertedReport)!.HandleReport(touchReport, _lastPos);
// The touch point that was moving the cursor changed, skip this report as it would cause a large delta
if (_lastTouchID != TouchConvertedReport.CurrentFirstTouchID && TouchConvertedReport.CurrentFirstTouchID != -1)
{
_lastPos = _convertedReport.Position;
_lastTransformedTouchPos = null;
skipReport = true;
}
_lastTouchID = TouchConvertedReport.CurrentFirstTouchID;
// Skip the report if the pressure is 0 or if the touch point changed
if (_convertedReport.Pressure != 0 && skipReport == false)
base.Read(_convertedReport); // We send another report instead of overwriting the touch report since plugins might rely on it
else
skipReport = false;

Right now, i don't send a report unless pressure is non-zero (pressed).
I don't send a report when pressure is zero.

If i try sending a report when pressure is 0, entirety of relative mode breaks.
Something similar happens with Absolute Mode

@Mrcubix
Copy link
Owner

Mrcubix commented Dec 2, 2024

Absolute Mode was an easy fix, Relative Mode isn't going to be, again, i have no singular idea of how to fix it

@Mrcubix
Copy link
Owner

Mrcubix commented Dec 2, 2024

@FranciscoTosi
Copy link
Author

https://github.com/Mrcubix/OTD.EnhancedOutputMode/actions/runs/12126867180/artifacts/2263581995 give this one a try

The issue remains in absolute mode.

Could you try using Touch Gestures instead of using left click in the UX?

I am not sure what you mean by this. Setting up a gesture that releases the mouse button?
Anyways, the Touch Gestures window remains on 'Connecting...' after going through the installation process (this is with the provided Enhanced Output Modes version), so I can't test it at the moment.

@Mrcubix
Copy link
Owner

Mrcubix commented Dec 3, 2024

The issue remains in absolute mode.

Odd, can't replicate it anymore

I am not sure what you mean by this.

Any press will result in a left click, even if you just want to move your mouse, that's why I'm recommending my touch gesture plugin instead of using left click in the UX which is intended for pen and Absolute Mices.

the Touch Gestures window remains on 'Connecting...' after going through the installation process

That's what happens if you don't enable, both the Touch Gestures in Filters & Touch Gestures Daemon in Tools.
All steps in the guide. Tested it on Windows, Raspi OS (yes on my Raspberry pi) & Mint from clean installs.

@Mrcubix
Copy link
Owner

Mrcubix commented Dec 3, 2024

2024-12-03.02-22-26.mp4

Just can't replicate it in Absolute mode like in this vid, and can't replicate it in relative mode anymore either.
Guess i would need a Data Recording from the Tablet Debugger :

  • Tick the box,
  • Touch & Release from the surface,
  • Close the window (So that it actually saves the content),
  • Upload that file, which should be in ~/.config/OpenTabletDriver

@FranciscoTosi
Copy link
Author

Here's the log I believe you mean:
tablet-data.txt

I apologize if this is nonsense, but I've been trying to understand the code and in TouchConvertedReport.cs:HandleReport you make sure to never report a position as null. Could this possibly be related?

@Mrcubix
Copy link
Owner

Mrcubix commented Dec 3, 2024

make sure to never report a position as null. Could this possibly be related?

The pressure is what matters, here, and in the case where there are no active touch, we just use the last position (to avoid some issues with relative mode specifically) & set pressure to 0.

The reason why i convert touch to pen inputs are :

  • They can be modified by smoothing filters,
  • It prevents some filters from breaking,
  • They can go down the pipeline normally (and be properly processed)

I won't lie that the processing to convert touch inputs to pen inputs needs a rewrite, but don't exactly have the time for that.
Currently working on learning about ASP.NET, to better my chances at job opportunities.

@FranciscoTosi
Copy link
Author

Here's a cleaner report I think: tablet-data.txt

@Mrcubix
Copy link
Owner

Mrcubix commented Dec 3, 2024

We could just not bother setting the pressure, but then we loose Pen Tip binding usage on touch
(which may or may not be an issue depending on users)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants