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

Avoid double click #39

Open
euu2021 opened this issue Oct 23, 2023 · 6 comments
Open

Avoid double click #39

euu2021 opened this issue Oct 23, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@euu2021
Copy link

euu2021 commented Oct 23, 2023

I'm using a facial gesture to send key presses, but I'm having problems with accidental double click.

In the Android Camera Switches app, by Google, there is an option to ignore repetitive presses. The user can set a time inside the app, so there is like a cooldown between each press.

Please, consider including this feature here, too.

Thanks,

@eariassoto
Copy link
Collaborator

@euu2021 I would like to better understand your issue, reproduce it, and think on ways to solve it. Could you please describe the keybindings that you are using? If I understood correctly, do you perform the gesture and Gameface send two click gestures one after the other?

I gave Switch access on Android a try. The setting mentioned by @euu2021 is "Ignore repeated Camera Switch triggers - Multiple Camera Switch triggers within this time will be treated as one trigger".

@eariassoto eariassoto self-assigned this Oct 25, 2023
@euu2021
Copy link
Author

euu2021 commented Oct 25, 2023

I'm using Gameface to operate a flashcard app. So, I spend hours just pressing 2 buttons (space bar or key 1):

flowchart TD
    A[Front of the card 1] -->|Space bar| B(Back of the card 1)
    B -->|Space bar| D[Good]
    B -->|Key 1| E[Bad]
    D --> F[Front of card 2]
    E --> F
    F -->|Space bar| G[...]
Loading

I use one gesture (mouthSmileRight) for Space Bar, and another gesture (Open mouth) for Key 1.

The problem happens when I make the gestures for Space Bar, and it registers twice. For example, if I'm facing the Front of card 1, a double space bar will make the back of the card appears, and, immediately (and undesirably), rate it good, thus making the Front of card 2 appear:

image

Notice that, at any point of the process, sending an unwanted double Space Bar is a problem

@euu2021
Copy link
Author

euu2021 commented Oct 25, 2023

And I use a very subtle threshold for detection, which makes it wonderfully comfortable to operate, but it sometimes gives me the double click problem.

In the following example I'm exaggerating by keeping in the verge of a smile (like when you are trying hard to hold a laugh), but it illustrates that, when using a subtle threshold, Gameface shows this Geiger counter behavior:

run_app_CkSVlzhpQG

So, I would like it to have a behavior like: detect green; cooldown for a second; detect green; cooldown for a second. I've been using it for months in Android and it works great.

@eariassoto
Copy link
Collaborator

Thank you for the clear explanation, I understand the issue. As you pointed out, the keybind controller does not have a cooldown between events, but I think I can implement it as an advanced config.

I will give it a try, and update this issue with a PR.

@eariassoto eariassoto added the enhancement New feature or request label Oct 25, 2023
@euu2021
Copy link
Author

euu2021 commented Oct 26, 2023

Thank you for the clear explanation, I understand the issue. As you pointed out, the keybind controller does not have a cooldown between events, but I think I can implement it as an advanced config.

I will give it a try, and update this issue with a PR.

Thanks!

@euu2021
Copy link
Author

euu2021 commented Oct 28, 2023

I just found another reference that may be useful for inspiration. In EyeCommander, this feature is called Throttle Time:

image

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