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 click support #79

Open
nicolasavru opened this issue Jul 2, 2024 · 1 comment
Open

touch click support #79

nicolasavru opened this issue Jul 2, 2024 · 1 comment

Comments

@nicolasavru
Copy link

Is there any way to get touch "clicks" (equivalent of mouse button clicks)? I'm adding and removing map markers based on clicks on the map. That works fine on linux and in a desktop browser with wasm, but doesn't work on a mobile browser. UserEvent doesn't have a touch enum variant and the touches aren't being translated to mouse events either. Winit seems to support it fine as I can interact with egui widgets.

@Maximkaaa
Copy link
Owner

Hi, @nicolasavru . This definitely needs some testing and investigation. So far I've only tested touch events as far as touch start/move/end goes. AFAIK, browsers generate mouseclick event on a touch click gesture, but I don't know how winit translates it, since there is no ElementState::Click variant there. So, I guess, winit drops all composit events and leaves only the raw ones to make the API work in the same way on all platforms.

If this is so, I would guess that there would be needed a dedicated module (or crate) to handle different touch gestures (click, long click, double-finger click etc.) to translate them into common Galileo UserEvent.

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

No branches or pull requests

2 participants