Skip to content

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

Open

Description

@slangreck

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 ;)

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Mar 2, 2021
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Mar 2, 2021
  3. zadjii-msft commented on Mar 2, 2021

    @zadjii-msft
    Member

    Oh man, there was quite the debate about this in the original PR: #8917 (comment)

    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!

  4. added
    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    on Mar 2, 2021
  5. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Mar 2, 2021
  6. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issue-BugIt either shouldn't be doing this or needs an investigation.Priority-3A description (P3)Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions