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

macOS: trackpad touch events #249

Closed
shaunlebron opened this issue Nov 24, 2022 · 5 comments
Closed

macOS: trackpad touch events #249

shaunlebron opened this issue Nov 24, 2022 · 5 comments

Comments

@shaunlebron
Copy link
Collaborator

shaunlebron commented Nov 24, 2022

Looking at adding access to macOS trackpad touch events. Some references to start:

tonsky pushed a commit that referenced this issue Nov 24, 2022
@tonsky
Copy link
Collaborator

tonsky commented Nov 24, 2022

I think web api should be studied for this too

@shaunlebron
Copy link
Collaborator Author

shaunlebron commented Nov 28, 2022

setAcceptsTouchEvents:YES seems to be deprecated for allowedTouchTypes. I had to find a usage example on GitHub.

The acceptsTouchEvents property also seemed necessary. Does Apple have newer docs on this?

I confirmed that the touch events are being caught now (see 49a4483). I will look at logging the touch event data to the window.

@shaunlebron
Copy link
Collaborator Author

I added EventTrackpadTouch* events and the dashboard event panel is logging them successfully. I will look at drawing the touch points in a new trackpad panel.

@tonsky
Copy link
Collaborator

tonsky commented Nov 30, 2022

That would be cool!

@shaunlebron
Copy link
Collaborator Author

shaunlebron commented Dec 1, 2022

I put a trackpad panel next to the mouse panel:

CleanShot.2022-12-01.at.13.27.59.mp4

Problems so far:

  1. The dashboard starts hiccuping when I move the touch points too quickly. Not sure what’s going on there.
  2. Touch point state goes out of sync if you use a four-finger gesture that exits the view (swipe up, down, out or in). Not sure how to get external touch events to keep those in sync.

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

No branches or pull requests

2 participants