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

Release only one of the keys #153

Open
alonso240 opened this issue Mar 30, 2024 · 3 comments
Open

Release only one of the keys #153

alonso240 opened this issue Mar 30, 2024 · 3 comments

Comments

@alonso240
Copy link

Hello.

First of all, thank you very much for the fantastic libraries.

I'm trying to make an ESP32-S3 behave as a keyboard+mouse.

Everything works correctly, but I have a question.

I want that when I hold down a button, the keyboard key is also pressed, I achieve that with "sendPress".

If, for example, I hold down the "A" and "S" keys, I release the "S" key and hold down the "A" key. How do I do it?

If I execute "sendRelease", as I understand it stops pressing all the keys.

Sorry for my English from Google Translate!!!

Thank you so much!!!!

Greetings.

@chegewara
Copy link
Owner

Hi,
when 2nd time you send sendPress() with only A OS should interpret it like you released S

@alonso240
Copy link
Author

So:

If I send "sendPress(A)" and then send "sendPress(B)" it would not add the presses (A and B).

I deactivate "A" and press "B"?

@chegewara
Copy link
Owner

chegewara commented Apr 2, 2024

Yes
Library is prepared to send only 1 key pressed at a time, so if you send another key press, the previous should be detected as released/de-pressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants