Skip to content

Conversation

@SadPencil
Copy link
Member

@SadPencil SadPencil commented Oct 22, 2025

This is a small update. It basically keeps the original implementation in 88185ee, but the condition of clearing the textbox is changed: only if HandleEscapeKey() returns false, i.e., this user has never used IME.

Explanation:

        // This method disables the ESC handling of the TextBox as long as the user has used IME.
        // This is because IME users often use ESC to cancel composition, and even if currently the composition is empty,
        // the user still expects ESC to cancel composition rather than deleting the whole sentence.
        // For example, the user might mistakenly hit ESC key twice to cancel composition -- deleting the whole sentence is definitely a heavy punishment for such a small mistake.

To make this judgement acts correctly, this PR intends to remove IMEEventReceived = true line in OnIMETextInput() method, as this method will also be called even if the user does not use an Asian IME.

Tested on my machine.

@SadPencil SadPencil requested a review from Rampastring October 22, 2025 19:41
@Rampastring Rampastring merged commit a3e835d into master Oct 22, 2025
1 check passed
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.

3 participants