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: change behavior of virtual (modifier) keys: short press keys to make them apply to only next key event, long press to have the key be "sticky". #117

Closed
sudomain opened this issue Dec 28, 2022 · 4 comments

Comments

@sudomain
Copy link

Hello,

Could the modifier keys (Shift, Ctrl, Alt, and Meta (Windows)) be made so that a long press causes them to become "sticky" (I.e. sticky keys) or applied to every key press until they're turned off with another press please? This is the current behavior of the short press of a modifier key. The reason I ask is because I'd also like the short press of modifier keys to apply only to the next key press, and then deactivate. This is similar behavior to Termux's extra-keys row, but also on many Android soft keyboards short pressing Shift tends to only capitalize the next letter, whereas long pressing Shift tends to activate caps lock.

@gujjwal00
Copy link
Owner

Hi @sudomain , I am working on full re-implementation of virtual keys. The new layout follows the same style as Termux. (There are some differences as the use case is different for AVNC).

  • 2-row layout similar to Termux
  • Meta keys are automatically released on next key press. Long-press to lock meta keys, as described in this particular issue.
  • There are three swipable "pages":
    • First two pages contain keys
    • Similar to Termux, third page contains an editbox. It allows you to have full-fledged Android editing experience in a session. When finished, you can send the whole text to server in one go.

First page:
Screenshot_2024-04-04-21-51-23-702_com gaurav avnc debug-edit

Edit box:
Screenshot_2024-04-04-21-52-25-104_com gaurav avnc debug-edit


While there are still some rough edges, I would appreciate if you guys can test it.
Test APK: https://github.com/gujjwal00/avnc/actions/runs/8556937174/artifacts/1385269187

cc @dp-alvarez

@sudomain
Copy link
Author

sudomain commented Apr 4, 2024

Thank you that's awesome. I can't wait to test it!

This might be a stretch, but what do you think about letting users configure the layout/order of the keys? Something similar to how Termux has the extra-keys property of the ~/.termux/termux.properties?

@gujjwal00
Copy link
Owner

That was already on my mind, but then the current implementation got slightly more complex. So I decided to get this working for now, and put custom configuration on hold. Maybe someday it will be implemented, but I don't have any immediate plans for it.

That said, is there any key missing from current layout?

@gujjwal00
Copy link
Owner

v2.5 is now available with this change.
And I will let you know when the keys are more configurable.

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