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

Support canvas touch input events #366

Closed
soundrez opened this issue Sep 1, 2018 · 5 comments
Closed

Support canvas touch input events #366

soundrez opened this issue Sep 1, 2018 · 5 comments
Labels
enhance-feature Create a new user-facing feature help wanted PR's would be appreciated platform-native Native-specific code changes or bugs platform-wasm WASM-specific code changes or bugs subsystem-input
Milestone

Comments

@soundrez
Copy link

soundrez commented Sep 1, 2018

Describe the problem you want to solve

Touchscreen tap events are recorded as mouse click events. All other gestures are ignored.

Describe the solution you'd like

Map canvas touch events (long press, drag) to quicksilver mouse input events. Perhaps later on, a separate input type can be added.

Are you interested in contributing?

Yes, if this is a good first issue.

@ryanisaacg ryanisaacg added enhance-feature Create a new user-facing feature platform-native Native-specific code changes or bugs platform-wasm WASM-specific code changes or bugs subsystem-input good first issue help wanted PR's would be appreciated labels Sep 1, 2018
@ryanisaacg
Copy link
Owner

This would definitely be a good addition to Event (it would also be important if Quicksilver was to ever support mobile, even though that's not currently on the roadmap.)

I'm pretty sure the web touch APIs make this pretty doable, but I'm less sure how well-supported touch events are in glutin, the desktop windowing library. I would be okay with some features that are web-only if they were clearly documented that way, but I generally prefer to only add things that are cross-platform.

@soundrez
Copy link
Author

soundrez commented Sep 2, 2018

Glutin docs do mention touch events, however touch on Windows native already works okay. Long presses are treated as right mouse clicks - useful when using Windows, probably not while playing games. I'll see if I can find a fix.

Registering touches as mouse clicks is enough for what I am currently trying to achieve. I could be wrong, but my understating is Event only needs enhancement if/when multitouch support is to be added.

@ryanisaacg
Copy link
Owner

Oh, I misread your issue then. Yeah, if multitouch isn't a consideration, then this should be at least a little easier.

@ryanisaacg ryanisaacg mentioned this issue Oct 27, 2018
6 tasks
@ryanisaacg ryanisaacg added this to the v0.3.3 milestone Oct 27, 2018
@0b01
Copy link

0b01 commented Dec 3, 2018

I added support for web touch api: koute/stdweb#305

For quicksilver, a simple way to support touch is to forgo multitouch and convert the primary touch into a mouse event.

@ryanisaacg ryanisaacg modified the milestones: v0.3.3, v0.3.4 Dec 12, 2018
@ryanisaacg ryanisaacg pinned this issue Dec 15, 2018
@ryanisaacg ryanisaacg modified the milestones: v0.3.4, v0.3.5 Dec 25, 2018
@ryanisaacg
Copy link
Owner

@soundrez This should be fixed on the development branch, and in the next release (0.3.5). Feel free to reopen if there are any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhance-feature Create a new user-facing feature help wanted PR's would be appreciated platform-native Native-specific code changes or bugs platform-wasm WASM-specific code changes or bugs subsystem-input
Projects
None yet
Development

No branches or pull requests

3 participants