Open knyipab opened 3 months ago
Rebased
I do not think it is a good idea to do things like this for key combinations. Probably it would be better to choose something like Host key (like in Virtualbox or VMWare Workstation) (and probably make it configurable, defaulting to right control) and implement additional key combinations for different actions (like toggling EK bar, fullscreen, other stuff.
Umm... I used only virt-manager and after looking at some screenshots, vmware workstation's model (any/combo of Ctrl, Shift, Alt and Meta as "host key") is probably easier to implement cuz Android natively provides isCtrlPressed()
, isShiftPressed()
, isAltPressed()
and isMetaPressed()
, so the current PR code logic won't need to change substantially. User can add entries of Host key + any additional key (though need to figure out how to do such variable-sized config layout & storage). Lastly, "Escape key" will remain to be a separate item in this preference page. What do you think?
See if this looks good to you. Feel free to change. Thanks.
Btw, I thought of changing the name of "Pause key intercepting with Esc key" option cuz that's not so accurate. Indeed, any gestures/keys/buttons that release pointer will be affected by this option. Probably it's better to remove this option, and then add "release pointer" to
userActionsValues
, so to distinguish from "release pointer and keyboard capture". That involes more changes to the code base, so I didn't implement and leave it to your decision.