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

Long press / press and hold function #7

Open
stnbndr opened this issue Apr 18, 2024 · 2 comments
Open

Long press / press and hold function #7

stnbndr opened this issue Apr 18, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@stnbndr
Copy link

stnbndr commented Apr 18, 2024

Is your feature request related to a problem? Please describe.
At the moment it is not possible to hold a button. The callback function is called immediately until the release.

Describe the solution you'd like
Would it be possible to enable a function to differer between a one time press and a long press / press and hold and the release?

Additional context
As an example, I press and hold the volume down button to start some speech recording and when the button is released a speech-to-text function gets startet. A bit like an old school walkie-talkie 😅

@ryaa ryaa self-assigned this Apr 19, 2024
@ryaa ryaa added the enhancement New feature or request label Apr 19, 2024
@ryaa
Copy link
Member

ryaa commented Apr 19, 2024

@stnbndr I think that this feature #6 should satisfy your needs. It should allow to subscribe to receive the appropriate events on key down, key up or both, and therefore you can track when a volume button was pressed and released. Please let me know your thoughts.

@stnbndr
Copy link
Author

stnbndr commented Apr 19, 2024

@ryaa thanks for your feedback. I have read through the feature #6 request. That sounds good to me. I think that could also solve my problem. I'm looking forward for the next release of the plugin with that feature included 😁
Thank you for your work!

Litte side note: I have already testet the plugin with Capacitor 6.0 and it was working out-of-the-box 👍

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