From 2a982112402f3d6222c71b4e5d33499937b6d79e Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Mon, 15 Sep 2025 15:21:56 -0500 Subject: [PATCH] CmdPal: prevent ctrl+i from inserting a tab (#41746) Eat the Ctrl+I, so that it doesn't insert a tab. Why does it insert a tab? Who knows. closes #41681 --- .../cmdpal/Microsoft.CmdPal.UI/Controls/SearchBar.xaml.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/SearchBar.xaml.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/SearchBar.xaml.cs index a5f02d76cb..12f22582fc 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/SearchBar.xaml.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/SearchBar.xaml.cs @@ -131,6 +131,11 @@ public sealed partial class SearchBar : UserControl, WeakReferenceMessenger.Default.Send(new OpenContextMenuMessage(null, null, null, ContextMenuFilterLocation.Bottom)); e.Handled = true; } + else if (ctrlPressed && e.Key == VirtualKey.I) + { + // Today you learned that Ctrl+I in a TextBox will insert a tab + e.Handled = true; + } else if (e.Key == VirtualKey.Escape) { if (string.IsNullOrEmpty(FilterBox.Text))