Skip to content

Commit

Permalink
I think this is a simpler solution, at least for #8480's sake
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Jan 26, 2022
1 parent 136a14a commit 5d4ac21
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/TabBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ namespace winrt::TerminalApp::implementation
}
});

TabViewItem().KeyUp({ get_weak(), &TabBase::_KeyHandler });
// TabViewItem().KeyUp({ get_weak(), &TabBase::_KeyHandler });
}

void TabBase::_KeyHandler(Windows::Foundation::IInspectable const& /*sender*/,
Expand Down
14 changes: 12 additions & 2 deletions src/cascadia/TerminalApp/TerminalPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,18 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mux="using:Microsoft.UI.Xaml.Controls"
Background="Transparent"
KeyDown="_KeyDownHandler"
mc:Ignorable="d">

<!--
Notes:
None of
PreviewKeyDown="_KeyDownHandler"
KeyDown="_KeyDownHandler"
KeyUp="_KeyDownHandler"
Seem to fire when the focus is in the TabViewItem or the NewTab flyout. But they fire just fine when focus is in the TermControl. Interesting, because you'd think that the TermControl would have already handled the key...
-->

<Grid x:Name="Root"
Background="Transparent">
<Grid.RowDefinitions>
Expand All @@ -22,7 +31,8 @@
</Grid.RowDefinitions>

<local:TabRowControl x:Name="TabRow"
Grid.Row="0" />
Grid.Row="0"
KeyUp="_KeyDownHandler" />

<StackPanel Grid.Row="1">
<mux:InfoBar x:Name="KeyboardServiceWarningInfoBar"
Expand Down

0 comments on commit 5d4ac21

Please sign in to comment.