-
Notifications
You must be signed in to change notification settings - Fork 932
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
SoftInput (Software Keyboard) support #1823
Comments
Yeah, this would be really useful. Especially since so far I have been completely unable to pop up the virtual keyboard on |
So... does any guy have any ideas? |
Not sure what's up with the NDK function but here is an example going trough jni: https://github.com/msiglreith/pixels-android/blob/master/src/lib.rs#L30 which shows the keyboard when tapping the screen. |
This example can work on my device. But do you mean this method has a compatibility problem? |
Sry, I referred to the Android winit platform implementation not Android itself: #2226 |
Thanks. That's okay if it only needs update winit to the latest version. 😃 |
@msiglreith Then, how to hide it? |
Feel free. I will probably look into opening a PR for this in the next days if there are no further issues with the JNI implementation.
I pushed a small change in the meantime to the repository from above which implements it (hides when tapping the screen again). |
@msiglreith Thanks for your example. I'm sorry for bothering you again, but... I have another two questions:
|
I think that's more tricky and not something which can be easily implemented. I would assume creating a custom View which will set the corresponding input type but that requires interfacing/compiling Java, which would require support on the tooling front in general...
I haven't tried IME myself - you might want to look at #2243 which seems to add more functionality for it (in particular enabling/disabling IME) |
are there any plans for implementation? workarounds posted here doesn't work anymore either |
There's been some progress on iOS in #3571, and some progress on Android in #2993, and finally we've been having some discussion with the Xilem folks about it. I think there are vague plans to work on it in/post v0.31, but that's all I can say. |
I'd add that if people are willing to put work into it, I'm all for having it. It's just should be just a little bit consistent with the rest of IME we have around, but that's about it. |
I see, I'd love to help but I honestly don't know anything about JNI. will look further to see if theres some parts I can contribute to. Thank you! |
I tested the Android keyboard launched via JNI on the Meta Quest2. It works exactly like any Android device. Indeed winit 0.30 blocks many characters including accented characters which it replaces completely with a backspace and erases the character typed previously. I made a short video: https://youtu.be/os8cucfF3D8 If you need to test I have an environment for that. |
Web can do this via the Cc @will-hart, Winit will implement a fallback using a hidden text input as well, unless I find some better method for non-Chromium browsers. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I've created PR in |
About this PR which is what I'm using for OpenXR/StereoKit-rust, may I suggest to enhance the KeyAction Enum with a more complete list. This will avoid the following warnings:
And will give access to ACTION_MULTIPLE which is the only way to get enhanced characters(here ò), smileys and utf8. |
@mvvvv Yes It is the same approach I saw in your post. I tried the windowInsets one as well however it hasn't work. The missing enhanced characters in keyEvent is completely orthogonal problem and definitely something I would like to solve. Could we move the conversation to the related issue? Ping me there please :) |
Done #4067 |
On android, the application should be able to request showing & hiding of soft input.
This is available through ndk_glue for android.
But this strangely feels like functionality that should be attached to window.
eg. for desktop we have cursor grabbing, for mobile, having methods for showing keyboard seems similar.
The text was updated successfully, but these errors were encountered: