gujjwal00 / avnc

VNC Client for Android
GNU General Public License v3.0
660 stars 59 forks source link

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 closed 5 months ago

sudomain commented 1 year ago

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 commented 7 months ago

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).

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 commented 7 months ago

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 commented 7 months ago

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 commented 5 months ago

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

gujjwal00 commented 3 months ago

Hi @sudomain I am working on allowing users to configure key layout. Instead of a file, I have added a small UI to customize keys.

Test APK: https://github.com/gujjwal00/avnc/actions/runs/10252731991/artifacts/1777326375 Go to Settings => Input => Virtual Keys => Customize keys to make changes.

sudomain commented 3 months ago

@gujjwal00 Thank you very much!