-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
Injected keyboard input events as "key events", rather than "text events". #256
Comments
Looks interesting, but I suspect it requires root or some manual setup on the device? Can you give us some insights @vivimillin ? |
AFAICT, AOAv2 only works for USB devices which can "speak" it, uhid OTOH needs to be loaded as a kernel module, which, if present, would require root. So this seems out of scope... |
no, no ScrCpy (and its input implementation) works perfect without root. :-) Among its several options of keyboard input modes, what I suggest equals the default one (sdk), not aoa/uhid. That the keyboard input events are injected at the Android API level. |
I'm a bit confused ;-) On https://github.com/Genymobile/scrcpy/blob/master/doc/keyboard.md it says the SDK method is only able to inject "ASCII and some other characters", so there would be no improvement w.r.t. the current situation? Can you point us at the exact API docs maybe? Edit: is this maybe related/same-as #208? Edit edit: specifically, the API linked in #208 (comment) ? |
I think in ScrCpy, the input is implemented with method: InputManager.injectInputEvent It's a hidden method, as explained: And codes here: /genymobile/scrcpy/wrappers/InputManager.java#L12 Also some other discussions: Sorry I fact I'm not expert on Android programming :-) |
then, the emulated key input was injected as KEYCODE with ACTION_DOWN & ACTION_UP, so that the keyboard behaves better as expected in games, as well as in IME. |
@vivimillin Thanks for the pointers, this makes sense. As droidVNC-NG is an app distributed through the app store, we can't use hidden API though. Our best best will be #208 (comment) 🤷. I think this could possibly handle non-English symbols as well, let's continue the research there :-). |
Is your feature request related to a problem? Please describe.
East Asian language input methods (IME) cannot be typed correctly on DroidVC-NG, and keyboard input can only be recognized as English characters, and cannot trigger IME recognition and conversion to characters.
Describe the solution you'd like
Injected keyboard input events (at the Android API level) as "key events", rather than "text evetns".
More specificly, numbers and "special characters" can be inserted using text events, but letters should be injected using key events, so that the keyboard behaves as expected in games, as well as in IME.
A good reference for implementation is scrcpy. And its implementation on keyboard input:https://github.com/Genymobile/scrcpy/blob/master/doc/keyboard.md
Your environment (please complete the following information):
The text was updated successfully, but these errors were encountered: