Skip to content

Commit

Permalink
keybindings too
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Jul 20, 2023
1 parent 5f9add4 commit a23c1a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cascadia/TerminalApp/AppActionHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,12 @@ namespace winrt::TerminalApp::implementation
const ActionEventArgs& args)
{
auto scratchPane{ winrt::make_self<ScratchpadContent>() };

// This is maybe a little wacky - add our key event handler to the pane
// we made. So that we can get actions for keys that the content didn't
// handle.
scratchPane->GetRoot().KeyDown({ this, &TerminalPage::_KeyDownHandler });

auto resultPane = std::make_shared<Pane>(*scratchPane);
_SplitPane(SplitDirection::Automatic, 0.5f, resultPane);
args.Handled(true);
Expand Down

0 comments on commit a23c1a2

Please sign in to comment.