-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Android: Keyboard modifier and arrow key support for text edit #40398
Android: Keyboard modifier and arrow key support for text edit #40398
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just checked the code and haven't tested yet. The DisplayServer part looks fine (apart from the comment by @akien-mga), and for now I don't clearly understand the java side.
I assume this change is only meant to be used for an actual connected keyboard? It's hard to tell how this might affect the case with virtual keyboard so it needs proper testing.
platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
Outdated
Show resolved
Hide resolved
Also I just saw that EditText didn't handle keyUp event, so I'm adding that |
c121de5
to
803c913
Compare
also tested with virtual keyboard and it doesn't seem to interfere |
asking again, any comment on this? |
It would be probably ok to change if needed, but is there an actual use case for an editor or game feature that could benefit from it? Pressing keyboard keys along with touch events doesn't seem user-friendly. |
I'm comming from the point of view of Android Editor where there it's pretty handy, but for other pojects most I can think of is testing your game on device/playing on chromeOS/playing on tablet without special touch control and in those cases a lot of time you can use drag or touch with one hand |
I understand it's physically possible in some cases but I would be for adding support for it only when there's a specific use case scenario that requires it. |
d0c5112
to
b234513
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the logic looks good; just a couple of comments to address.
platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
Outdated
Show resolved
Hide resolved
65e4ae2
to
ba71c80
Compare
platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
Outdated
Show resolved
Hide resolved
ba71c80
to
cb06d90
Compare
Needs a rebase to fix CI builds (at least Linux - not sure why macOS fail but a new build will likely let it pass). |
cb06d90
to
166103c
Compare
@akien-mga rebased :) |
Thanks! |
Needed for #36776, also I think it's a welconiing change anyway
thinking changing
InputEventScreenTouch
andInputEventScreenDrag
to inherit fromInputEventWithModifiers
instead so they could also get benefits from this PR(if someone have better option for what I did on
onKeyDown
inGodotEditText
I would be glad to hear)Tested on Android Editor and https://github.com/thebestnom/Android-Tester