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

Added Touchscreen & Touchpad Capabilities #13

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

calebcoverdale
Copy link

Hello!

I added 2 files to the libs folder:
GuacTouchpad.js
GuacTouchscreen.js

These come right from the guacamole documentation here.

On line 230 I added in the touchpad reference:

this.touchpad = new Guacamole.Touchpad(displayElm);

And also line 252:

this.touchpad.onmousedown = this.touchpad.onmousemove = this.touchpad.onmouseup = this.handleMouseState;

As per ApacheGuacamole's documentation Guacamole.Touchpad/Touchscreen are just additions to the Guacamole.mouse state.

For future reference - if anyone wants touchscreen (note - no multitouch here.... no easy scrolling.... problems with accuracy) just do a find replace for "touchpad" with "touchscreen" - should work you.

Thank you so much for the work you put into the project so far, it's so fast!

@vandelpavel
Copy link

I tried to use some of the code inside this PR for one of my projects and I've noticed that both "guacamole-touchscreen" and "guacamole-touchpad" didn't fulfill all the requirements to fully use touch capabilities (at least the more used ones).
First of all I've changed the the 2 files so they support typescript and then I changed them to be composables and removed the "this" from the scope.
Then I focused mainly on the "guacamole-touchpad" and currently it supports:

  • tap
  • double tap (solved issue with clicking over the cursor and getting the wrong target)
  • tap+drag
  • 2 fingers tap (right click)
  • 2 fingers drag (vertical and horizontal scroll)

If you like I can share my code.

@calebcoverdale
Copy link
Author

That would be incredible!

This felt like ages ago.

It was definitely one of my first stabs at programming.

@VidipG
Copy link

VidipG commented Jan 23, 2024

I tried to use some of the code inside this PR for one of my projects and I've noticed that both "guacamole-touchscreen" and "guacamole-touchpad" didn't fulfill all the requirements to fully use touch capabilities (at least the more used ones). First of all I've changed the the 2 files so they support typescript and then I changed them to be composables and removed the "this" from the scope. Then I focused mainly on the "guacamole-touchpad" and currently it supports:

  • tap
  • double tap (solved issue with clicking over the cursor and getting the wrong target)
  • tap+drag
  • 2 fingers tap (right click)
  • 2 fingers drag (vertical and horizontal scroll)

If you like I can share my code.

I am working on a similar project and am seeing some issues with implementing the touchpad. Can I take a look at your code if possible? Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants