From 40d7c2aa10fdf3144f3ba3ea2ec7e2aa5dce55fc Mon Sep 17 00:00:00 2001 From: Yair <39923744+yaira2@users.noreply.github.com> Date: Tue, 4 Nov 2025 15:36:12 -0500 Subject: [PATCH] Fix: Prevent Ctrl+C from overriding Text Block copy behavior Adds a check to ensure that Ctrl+C does not override the default copy behavior when a TextBlock is focused, preserving expected text copying functionality. --- src/Files.App/Views/MainPage.xaml.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Files.App/Views/MainPage.xaml.cs b/src/Files.App/Views/MainPage.xaml.cs index d17335dcd6ac..02fe6b441a07 100644 --- a/src/Files.App/Views/MainPage.xaml.cs +++ b/src/Files.App/Views/MainPage.xaml.cs @@ -235,6 +235,9 @@ private async Task OnPreviewKeyDownAsync(KeyRoutedEventArgs e) if (command.Code is CommandCodes.OpenItem && (source?.FindAscendantOrSelf() is not null || source?.FindAscendantOrSelf() is not null)) break; + // Prevent ctrl + c from overriding copy in textblocks + if (currentModifiers == KeyModifiers.Ctrl && e.Key is VirtualKey.C && (FrameworkElement)FocusManager.GetFocusedElement(MainWindow.Instance.Content.XamlRoot) is TextBlock) + break; if (command.Code is not CommandCodes.None && keyReleased) {