refactor: send KEYCODE_ENTER instead of commit "\n" when pressing enter on virtual keyboard#1940
Open
WhiredPlanck wants to merge 1 commit intoosfans:developfrom
Open
refactor: send KEYCODE_ENTER instead of commit "\n" when pressing enter on virtual keyboard#1940WhiredPlanck wants to merge 1 commit intoosfans:developfrom
WhiredPlanck wants to merge 1 commit intoosfans:developfrom
Conversation
…er on virtual keyboard Fix some misbehavior editors with non-empty IME_ACTION_* but also IME_FLAG_NO_ENTER_ACTION: just let the editor handle enter key itself Close osfans#1939 Ref: fcitx5-android/fcitx5-android@61e10af
There was a problem hiding this comment.
Pull request overview
Updates Trime’s Enter key handling to send KEYCODE_ENTER key events instead of directly committing "\n" in cases where the target editor should handle the Enter behavior itself (notably when IME_FLAG_NO_ENTER_ACTION is set), addressing search/submit misbehavior reported in #1939.
Changes:
- Treat
IME_FLAG_NO_ENTER_ACTIONas a condition to forward an Enter key event to the app/editor. - For
IME_ACTION_UNSPECIFIED/IME_ACTION_NONE, forwardKEYCODE_ENTERrather than committing a newline.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request
Issue tracker
Fixes will automatically close the related issues
Fixes #1939
Feature
Describe features of this pull request
Fix some misbehavior editors with non-empty IME_ACTION_* but also IME_FLAG_NO_ENTER_ACTION: just let the editor handle enter key itself
Ref: fcitx5-android/fcitx5-android@61e10af
Code of conduct
Code style
make sytle-lintBuild pass
make debugManually test
Code Review
Daily build
Login and download artifact at https://github.com/osfans/trime/actions
Additional Info