findMatch keybindings are ignored if focus is still in the search box #12809

Open
opened 2026-01-31 03:25:32 +00:00 by claunia · 1 comment
Owner

Originally created by @slangreck on GitHub (Mar 2, 2021).

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.1256]
Windows Terminal version (if applicable): Windows Terminal Preview Version: 1.7.572.0

Any other software?
No

Steps to reproduce

Bind find, findNext and findPrev as such:

{
    "command": "find",
    "keys": "ctrl+f"
},
{
    "command": {
        "action": "findMatch",
        "direction": "next"
    },
    "keys": "f3"
},
{
    "command": {
        "action": "findMatch",
        "direction": "prev"
    },
    "keys": "shift+f3"
}

In the terminal, hit ctrl+f to start a search, enter a search term and press enter. Then press F3 and shift+F3 to go back and forth through the search results.

Expected behavior

F3 should highlight the next search result, shift+F3 should highlight the previous result.

Actual behavior

F3 and shift+F3 are ignored as long as focus remains in the search box. Instead enter and shift+enter hightlight the previous, respectively the next result.

If the focus is moved from the search box to the terminal pane, F3 and shift+F3 work as expected.

PS: Your release notes said I could bind the findNext and findPrev actions, when I actually had to bind the findMatch action with a direction parameter ;)

Originally created by @slangreck on GitHub (Mar 2, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.1256] Windows Terminal version (if applicable): Windows Terminal Preview Version: 1.7.572.0 Any other software? No ``` # Steps to reproduce Bind find, findNext and findPrev as such: ```JSON { "command": "find", "keys": "ctrl+f" }, { "command": { "action": "findMatch", "direction": "next" }, "keys": "f3" }, { "command": { "action": "findMatch", "direction": "prev" }, "keys": "shift+f3" } ``` In the terminal, hit ctrl+f to start a search, enter a search term and press enter. Then press F3 and shift+F3 to go back and forth through the search results. # Expected behavior F3 should highlight the next search result, shift+F3 should highlight the previous result. # Actual behavior F3 and shift+F3 are ignored as long as focus remains in the search box. Instead enter and shift+enter hightlight the previous, respectively the next result. If the focus is moved from the search box to the terminal pane, F3 and shift+F3 work as expected. PS: Your release notes said I could bind the `findNext` and `findPrev` actions, when I actually had to bind the `findMatch` action with a `direction` parameter ;)
claunia added the Issue-BugPriority-3Product-TerminalArea-TerminalControl labels 2026-01-31 03:25:32 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Mar 2, 2021):

Oh man, there was quite the debate about this in the original PR: https://github.com/microsoft/terminal/pull/8917#discussion_r570661029

We decided against it originally, because it had a bunch of weird edge cases. Our story for how the SearchBoxControl and the TermControl interact is singularly unpleasant. Hopefully we can fix that soon.

Thanks!

@zadjii-msft commented on GitHub (Mar 2, 2021): Oh man, there was quite the debate about this in the original PR: https://github.com/microsoft/terminal/pull/8917#discussion_r570661029 We decided against it originally, because it had a bunch of weird edge cases. Our story for how the SearchBoxControl and the TermControl interact is singularly unpleasant. Hopefully we can fix that soon. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12809