Skip to content

refactor: send KEYCODE_ENTER instead of commit "\n" when pressing enter on virtual keyboard#1940

Open
WhiredPlanck wants to merge 1 commit intoosfans:developfrom
WhiredPlanck:fix-0306
Open

refactor: send KEYCODE_ENTER instead of commit "\n" when pressing enter on virtual keyboard#1940
WhiredPlanck wants to merge 1 commit intoosfans:developfrom
WhiredPlanck:fix-0306

Conversation

@WhiredPlanck
Copy link
Collaborator

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

Build pass

  • make debug

Manually test

  • Done

Code Review

  1. No wildcards import
  2. Manual build and test pass
  3. GitHub Action CI pass
  4. At least one contributor review and approve
  5. Merged clean without conflicts
  6. PR will be merged by rebase upstream base

Daily build

Login and download artifact at https://github.com/osfans/trime/actions

Additional Info

…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
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ACTION as a condition to forward an Enter key event to the app/editor.
  • For IME_ACTION_UNSPECIFIED / IME_ACTION_NONE, forward KEYCODE_ENTER rather than committing a newline.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@WhiredPlanck WhiredPlanck requested a review from Bambooin March 6, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

部分应用的搜索框中,按回车无法触发搜索

2 participants