cmdpal: move kb shortcut handling to PreviewKeyDown (#40777)

This lets things like C-S-c work in the text box, and in the context
menu too

Closes #40174
This commit is contained in:
Mike Griese
2025-07-28 20:17:27 -05:00
committed by GitHub
parent 3a0487f74a
commit 5f2e446f3b
3 changed files with 20 additions and 14 deletions

View File

@@ -84,7 +84,7 @@ public sealed partial class ContextMenu : UserControl,
}
}
private void CommandsDropdown_KeyDown(object sender, KeyRoutedEventArgs e)
private void CommandsDropdown_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
{
if (e.Handled)
{
@@ -174,8 +174,6 @@ public sealed partial class ContextMenu : UserControl,
e.Handled = true;
}
CommandsDropdown_KeyDown(sender, e);
}
private void ContextFilterBox_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
@@ -192,6 +190,8 @@ public sealed partial class ContextMenu : UserControl,
e.Handled = true;
}
CommandsDropdown_PreviewKeyDown(sender, e);
}
private void NavigateUp()