Skip to content

TermControl key down handling investigation and refactoring #4031

@KaiyuWang16

Description

@KaiyuWang16

In current TermControl implementation, KeyDown events are handled by PreviewKeyDown event. It uses Tunneling strategy and key down events will first be sent to XAML root element, which is TermControl.

SearchBoxControl is a child element of TermControl. Thus, key input events on SearchBoxControl will be sent to TermControl first. Now there is an early return check in TermControl::_KeyDownHandler, which prevents key inputs from Search Box to be processed by TermControl. But this is not a good implementation.

We need to think about using KeyDown instead of PreviewKeyDown event handler in TermControl, but we need to make sure this change won't break anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions