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

Suggested Gesture (suggesture?): Swipe left and right #3

Open
jziggas opened this issue Oct 11, 2021 · 2 comments
Open

Suggested Gesture (suggesture?): Swipe left and right #3

jziggas opened this issue Oct 11, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@jziggas
Copy link

jziggas commented Oct 11, 2021

Hello from HN and cool library ;)

I'm unable to find a sufficient image or video for what I'm thinking of. Imagine "wiping" your full palm across the frame (either palm facing the screen, or palm facing to the left or right of you) from the left to right, or right to left. The use case I am imaging this for is to go backward/forward in a browser.

@b-3-n
Copy link
Contributor

b-3-n commented Oct 11, 2021

Hey, thanks for trying it out and for the suggestion.

I think with gestures like the one you are proposing the tricky bit is to ensure a good user experience since the gesture works in a symmetric fashion. Imagine the user simply wants to go back in the browser history two times. The user will wipe e.g. from right to left two times. The tricky bit lies in what happens between these two wipes. I expect many users will intuitively reposition their hand after the first wipe back the right side in such a way that it is not clear whether the user actually just wants to reposition the hand or is issuing the opposite move i.e. going forward in history. If for some reason it would be guaranteed that the user moves the hand out of the camera view during the repositioning it would work but obviously this is a severe restriction.

The best way to solve this in my opinion is to rely on one of the hand poses that YoHa can detect (i.e. pinch and fist as of now). Then the user can clearly indicate the difference between repositioning and performing an intentional action. (E.g. in the above example the user would make a fist while moving from right to left to go back and move the open hand to the right to reposition the hand.) Now to actually "detect" such a gesture is rather simple: One only has to look for the respective hand pose and trigger an event (wipe left/right) depending on whether the user moved sufficient distance while uninterruptedly performing said hand pose. This should be quiet easy to implement with the current API. If you'd like to implement something like this I'd be happy to help.

I'm not sure yet where I would include such gestures to make other users benefit from it as well. I have a feeling that it doesn't belong into the library as it is (the way I described it) something rather custom. Maybe for now it would suffice to maintain a list of code examples. Any thoughts?

Does everything make sense or do you have questions/comments?

@jziggas
Copy link
Author

jziggas commented Oct 19, 2021

I think it makes sense. Other random ideas off the top of my head might be a "end of gesture" gesture or to throttle/debounce gestures.

@b-3-n b-3-n added the enhancement New feature or request label Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants