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

Touch Gestures not having consistent input #14

Open
xSamel-The-Camelx opened this issue Oct 29, 2024 · 9 comments
Open

Touch Gestures not having consistent input #14

xSamel-The-Camelx opened this issue Oct 29, 2024 · 9 comments
Assignees
Labels
bug Something isn't working external issue partially or entirely due to external frameworks or libraries good first issue Good for newcomers

Comments

@xSamel-The-Camelx
Copy link

Whenever a Touch Gesture input + any cursor movement happens (ie from a mouse or from having a pen on the same tablet) some Touch Gesture inputs are dropped.
Have only tested with Scroll bound to Paning so far.
This seems to be a linux only issue, the very limited testing I did on windows seemed to work as intended.

@Mrcubix
Copy link
Owner

Mrcubix commented Oct 29, 2024

Pretty much all touch gestures are timing sensitives, which could be an issue if a pen & touch are used at the same time.

As for moving the mouse causing issues?
That is very odd, not something i or a couple other people (who ended up ghosting me when testing feedback was needed) noticed.

Will investigate, but maybe i should implement & provide a way in the app to test gestures and see when a gesture has started / bind was activated / touch was released (sometimes without any being involved)

@Mrcubix
Copy link
Owner

Mrcubix commented Oct 29, 2024

Could you check if the same issue happens with single touch gesture using your pen.
(It should be a separate filter in the same tab and the setup knterface should be different)

UX : https://github.com/Mrcubix/Touch-Gestures/actions/runs/11282164018

Plugin (to place in OTD.EnhancedOutputMode) : https://github.com/Mrcubix/Touch-Gestures/actions/runs/11282164007

Reason why i'm not linking the pre-release is because there is an issue with the installer i didn't think off : (at least on windows) Plugins can't be unloaded easily & updated by another plugin (considered in use).

@xSamel-The-Camelx
Copy link
Author

xSamel-The-Camelx commented Oct 29, 2024

Not sure If I did everything right. So I'll explain what I did.

Uninstalled all plugins but Scroll Bindings and Enhanced Out put Modes. extracted the contents of the plugin you linked into ~/.config/OpenTabletDriver/Plugins/Enhanced Output Modes. Ran the UX. Didnt have Pen Gestures so closed everything, redid extracting the plugin, and opened the OTD Daemon, GUI and your Touch Gestures UX. Enabled Pen Gestures and disabled Touch Gestures. Setup Scroll up bound to Pan UP and tested it. It worked for the first test, but Left click was still bound to the tip. Went to disable it and the scroll speed was a fraction of what it was before. I think I just closed and reopened the UX and added Scroll Down to Pan Down and it crashed

samelthecamel@Camel-Comp ~/OTDTesting $ ./Touch-Gestures.UX.Desktop Unhandled exception. System.InvalidOperationException: Operation is not valid due to the current state of the object. at TouchGestures.UX.ViewModels.BindingsOverviewViewModel.OnSetupCompleted(Object sender, GestureAddedEventArgs e) in /home/runner/work/Touch-Gestures/Touch-Gestures/Touch-Gestures.UX/ViewModels/BindingsOverviewViewModel.cs:line 291 at TouchGestures.UX.ViewModels.GestureSetupWizardViewModel.OnSetupCompleted(Object sender, EventArgs e) in /home/runner/work/Touch-Gestures/Touch-Gestures/Touch-Gestures.UX/ViewModels/GestureSetupWizardViewModel.cs:line 156 at TouchGestures.UX.ViewModels.Controls.Setups.GestureSetupViewModel.OnSetupCompleted(GestureSetupViewModel sender) in /home/runner/work/Touch-Gestures/Touch-Gestures/Touch-Gestures.UX/ViewModels/Controls/Setups/GestureSetupViewModel.cs:line 200 at TouchGestures.UX.ViewModels.Controls.Setups.SwipeSetupViewModel.DoComplete() in /home/runner/work/Touch-Gestures/Touch-Gestures/Touch-Gestures.UX/ViewModels/Controls/Setups/SwipeSetupViewModel.cs:line 151 at CommunityToolkit.Mvvm.Input.RelayCommand.Execute(Object parameter) at Avalonia.Controls.Button.OnClick() at Avalonia.Controls.Button.OnPointerReleased(PointerReleasedEventArgs e) at Avalonia.Reactive.LightweightObservableBase`1.PublishNext(T value) at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) at Avalonia.Input.MouseDevice.MouseUp(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties props, KeyModifiers inputModifiers, IInputElement hitTest) at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e) at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken) at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl) at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder) at TouchGestures.UX.Desktop.Program.Main(String[] args) in /home/runner/work/Touch-Gestures/Touch-Gestures/Touch-Gestures.UX.Desktop/Program.cs:line 13 Aborted samelthecamel@Camel-Comp ~/OTDTesting $

somewhere in there my mouse was losing some functionally, think it didn't want to scroll while the Pen was hovering over the tablet but I don't remember the details.

Ill continue to test and come back with anymore notable results

Edit: Modifying the Tip Binding at all provides the slower speed, using this site for my scroll testing https://cpstest.org/scroll-test.php I was only able to hit 120 px/s
I had fixed it to revert back to a normal speed (I think around 1200 - 2000 px/s), but once it broke a second time restarting the OTD daemon, gui and ux did nothing to fix it. Even restarting my pc did nothing.

Edit 2: remaking the Gestures fixed the slow scrolling speeds

Edit 3: The same behavior I had with the touch is happening with the pen. But also happening with itself, pen movement + gesture makes the gesture drop inputs. Only way to get proper gesture input with the pen is by dropping the sensitivity to 0.

@Mrcubix
Copy link
Owner

Mrcubix commented Oct 29, 2024

Uninstalled all plugins but Scroll Bindings and Enhanced Out put Modes. extracted the contents of the plugin you linked into ~/.config/OpenTabletDriver/Plugins/Enhanced Output Modes

Odd, should only have to extract the release & overwrite files when necessary in the OTD.EnhancedOutputMode directory, then restart the service (Linux) or restart the daemon (Windows).

./Touch-Gestures.UX.Desktop Unhandled exception. System.InvalidOperationException: Operation is not valid due to the current state of the object.

The exception you encountered only occur because the wizard somehow stopped being.

private void OnSetupCompleted(object? sender, GestureAddedEventArgs e)
{
if (NextViewModel is not GestureSetupWizardViewModel)
throw new InvalidOperationException();
if (SelectedTablet == null)
return;

The only ways NextViewModel could not be the setup wizard are :

  • A setup (or an Edit) was Cancelled,
  • A setup (or an Edit) was Completed.

But at that point, the Setup wizard should not be active anymore, so this situation should not be possible.

Modifying the Tip Binding at all provides the slower speed, using this site for my scroll testing

Abnormal to say the least.

remaking the Gestures fixed the slow scrolling speeds

This plugin stores gestures settings in a file named Touch-Gestures.json, it should be created in whatever directory OpenTabletDriver consider "AppData" :

  • $XDG_CONFIG_HOME/OpenTabletDriver,
  • ~/.config/OpenTabletDriver

Could try backing it up, starting fresh and see if it occurs.

The same behavior I had with the touch is happening with the pen. But also happening with itself

If you can get a recording and see it here, or at least a recording of the recorded inputs, via OTD's Tablet debugger
(Tablet -> Tablet debugger), so i can throw it at the unit test and see what behavior comes out of it.

@xSamel-The-Camelx
Copy link
Author

xSamel-The-Camelx commented Oct 29, 2024

If you can get a recording and see it here

Accidentally streamed it instead of recording it, hopefully it still works out.
https://www.twitch.tv/videos/2288301273
The super slow speeds were when I was using the mouse at the same time as Pen Gestures
Pen at greater than 0 sens with Pen Gestures would be about half rate
I only had scroll up bound and had to reset the binding in the UX every time I changed the Sensitivity

Could try backing it up, starting fresh and see if it occurs.

Did not fix anything. fixing it is as simple as clicking the 3 dots then hitting apply then save and its good. But I have to do that every time a setting is changed in OTD it seems. I don't know where the line on what breaks it and what doesn't.

The only ways NextViewModel could not be the setup wizard are :

It might have crashed around the time I was making the down scroll binding. I don't remember exactly. But I do know that down scroll binding wasn't there when I opened it back up after the crash.

@Mrcubix Mrcubix self-assigned this Oct 29, 2024
@Mrcubix Mrcubix added bug Something isn't working good first issue Good for newcomers external issue partially or entirely due to external frameworks or libraries labels Oct 29, 2024
@Mrcubix
Copy link
Owner

Mrcubix commented Oct 29, 2024

Pen at greater than 0 sens with Pen Gestures would be about half rate
Only way to get proper gesture input with the pen is by dropping the sensitivity to 0

It shouldn't be affected by pen sens, since it works using the raw coordinates provided by the tablet, and get triggered when a specific amount of lines is moved, no matter the area used.

Not exactly sure how to troubleshoot this at this point.

New Plans

Coming back to the original issue, Here is what I'm gonna add to my plans :

  • In-app, Gesture debugger, So i don't have to remote debug & place logpoints on every gestures,
  • Write more testing procedure,
  • Document the intended behavior of the UX,
  • Document the intended behavior of each gestures,
  • Investigate the scrolling behavior on more distros (Send Help), than just Raspi OS (Debian) & Mint (Ubuntu -> Debian).

Once the issue is identified, here is how I'm gonna proceed :

  • Figure out a proper fix, do further testing, then request for testing from others,
  • Proceed the same way, for pen inputs.

There will be probably more to come, but for now, that's what i have in mind, that & the 5h of sleep, that is.
(US-like Schedule reset hit hard)

Updated TODO.md in the Soft-Key branch to reflect these plans.

https://github.com/Mrcubix/Touch-Gestures/blob/Soft-Keys/TODO.md

Mrcubix added a commit that referenced this issue Oct 29, 2024
Also update TODO with new tasks, following #14
@xSamel-The-Camelx
Copy link
Author

xSamel-The-Camelx commented Nov 15, 2024

Investigate the scrolling behavior on more distros (Send Help), than just Raspi OS (Debian) & Mint (Ubuntu -> Debian).

I can distro hop through any you need testing done on. Is there anything other than just the scrolling behavior you would like me to test? I am fine with testing stuff unrelated to this if you like.

My current outline on what I plan to test is
Every major DE on whatever distro that implements them is most popular ie Gnome on Ubuntu
At least every Major distro ie Ubuntu, Fedora, Arch

That should leave me testing on
Ubuntu
Mint with Cinnamon
Fedora
openSUSE
Arch linux (prob just just with kde)

If Raspi OS works on regular hardware I can test that for you too

Testing will be done on a different system from my desktop, it will all be done on the lowest spec OG Framework laptop

If there are any other distros you would like me to test on please let me know.
I will probably start testing on ether the 25th or the 2nd.

@Mrcubix
Copy link
Owner

Mrcubix commented Nov 15, 2024

One of my desktop installs is Mint with cinnamon, but it's possible things changed is newer versions, so prob worth investigating that.

I already tried on RaspiOS, but once again, there is new version (that breaks stuff and focus too much on wayland), so i haven't switched yet, i believe they still provide installs for x86? Though i doubt the behavior will be much different.

@Mrcubix
Copy link
Owner

Mrcubix commented Dec 23, 2024

Finally managed to get a arch install working, and was unable to get the same behavior,
Will still proceed with the TODO whenever i have time as I'm preparing to start working in January.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external issue partially or entirely due to external frameworks or libraries good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants