[PR #4723] [MERGED] Allow IME input in Search Box #25906

Open
opened 2026-01-31 09:12:33 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4723
Author: @leonMSFT
Created: 2/26/2020
Status: ✅ Merged
Merged: 2/26/2020
Merged by: @undefined

Base: master ← Head: dev/lelian/imesearchbox


📝 Commits (2)

  • 6c639df Allow IME input in Search Box
  • 6020847 moving block above uia engine enable

📊 Changes

1 file changed (+9 additions, -0 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+9 -0)

📄 Description

Summary of the Pull Request

Currently, when the user attempts to type using IME while the Search Box is focused, the input goes to the terminal instead. This is due to the fact that the TSFInputControl assumes it's in control whenever TermControl gets focus. So, it'll intercept IME input before the Search Box receives it. We simply need to modify TermControl::GotFocus to check if the SearchBox has focus. If it does, TSFInputControl::NotifyFocusEnter shouldn't be called.

As a small side fix, I've also disabled the terminal cursor blinking when the Search Box has focus.

Thinking a little further, if we have more features in the future that behave like search box (i.e. advanced tab switcher, or any other XAML controls that pop up) and require text input, we might need to create a sort of "AnyOtherTextControlInFocus" function to see if TSFInputControl should receive focus or not.

PR Checklist

Validation Steps Performed

Search works as expected with IME. Composition picker appears underneath Search Box when typing IME in the Search Box. Clicking outside of the Search Box still returns control to TSFInputControl/TermControl.

Terminal Cursor blinks when it has focus, and doesn't when the Search Box has focus.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/4723 **Author:** [@leonMSFT](https://github.com/leonMSFT) **Created:** 2/26/2020 **Status:** ✅ Merged **Merged:** 2/26/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/lelian/imesearchbox` --- ### 📝 Commits (2) - [`6c639df`](https://github.com/microsoft/terminal/commit/6c639df5237576ed100c7a3f354aa00157476991) Allow IME input in Search Box - [`6020847`](https://github.com/microsoft/terminal/commit/6020847fa45ccfb8352a1a47324efd314b53c5b7) moving block above uia engine enable ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+9 -0) </details> ### 📄 Description ## Summary of the Pull Request Currently, when the user attempts to type using IME while the Search Box is focused, the input goes to the terminal instead. This is due to the fact that the `TSFInputControl` assumes it's in control whenever TermControl gets focus. So, it'll intercept IME input before the Search Box receives it. We simply need to modify `TermControl::GotFocus` to check if the SearchBox has focus. If it does, `TSFInputControl::NotifyFocusEnter` shouldn't be called. As a small side fix, I've also disabled the terminal cursor blinking when the Search Box has focus. Thinking a little further, if we have more features in the future that behave like search box (i.e. advanced tab switcher, or any other XAML controls that pop up) and require text input, we might need to create a sort of "AnyOtherTextControlInFocus" function to see if TSFInputControl should receive focus or not. ## PR Checklist * [x] Closes #4434 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed ## Validation Steps Performed Search works as expected with IME. Composition picker appears underneath Search Box when typing IME in the Search Box. Clicking outside of the Search Box still returns control to TSFInputControl/TermControl. Terminal Cursor blinks when it has focus, and doesn't when the Search Box has focus. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:12:33 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25906