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

feature request - Double Click #201

Closed
dennisorlando opened this issue May 10, 2023 · 4 comments
Closed

feature request - Double Click #201

dennisorlando opened this issue May 10, 2023 · 4 comments
Labels
wontfix This will not be worked on

Comments

@dennisorlando
Copy link

Hi, it would be amazing to have a new "DoubleClick" event (or perhaps a "MultipleClick" one), maybe something like this?

  • configurable time delay that defaults to 400ms (default time delay for most apps and desktops)
  • another configuration that makes it either fire a "doubleclick" while still firing single "click" events or firing "doubleckick" events and blocking single click events that would be generated
  • reset delay when moving around, or perhaps only dire this event if the target is the same entity in both cases (as you are already doing with "click")
  • maybe as an optional feature?
@aevyrie
Copy link
Owner

aevyrie commented May 11, 2023

This may be difficult to implement without bevyengine/bevy#5984

Because multi clicks happen rapidly, there is a non-insignificant chance that they will be gobbled up between frames.

@dennisorlando
Copy link
Author

dennisorlando commented May 11, 2023

This may be difficult to implement without bevyengine/bevy#5984

Because multi clicks happen rapidly, there is a non-insignificant chance that they will be gobbled up between frames.

Do you mean that maybe you get like "Down - Down - Up - Up" instead of "Down - Up (Click) - Down - Up (Click, DoubleClick"?

p.s: I found this post, it might be or might be not relevant; there's a comment saying that double clicks are like 200ms apart, I didn't confirm it myself tho -> stackexchange
If double clicks are so far apart then maybe there's a bigger change to "gobble" single Clicks? Maybe getting an "Up-Down" event instead of a "Down-Up"? I'm not that well informed about the problem tho, I'll check your implementation of "Click"

@aevyrie
Copy link
Owner

aevyrie commented May 15, 2023

Not all users will be running at 60Hz, and it's possible for the application to hitch, causing a buildup of inputs. It won't be an an issue in most cases, but it also means the faster that someone double clicks, the more likely this is to occur.

On an unrelated note, I'm also not certain what the best course of action is for getting the threshold timing. This is user-configurable, and is needed especially for accessibility reasons.

Neither of these are blockers per se, but certainly need to be considered and discussed.

@aevyrie aevyrie added the wontfix This will not be worked on label Nov 10, 2023
@aevyrie
Copy link
Owner

aevyrie commented Nov 10, 2023

Marking this as a wontfix for the time being. We can reconsider if we get better support in bevy, or get access to system double click settings.

@aevyrie aevyrie closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants