From e61cb5e7092e81288c52412ed191c3392728fbc3 Mon Sep 17 00:00:00 2001 From: l4kr Date: Sat, 4 Jul 2026 12:08:56 +0200 Subject: [PATCH] fixed space to play --- MainWindow.xaml | 1 + MainWindow.xaml.cs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/MainWindow.xaml b/MainWindow.xaml index 8f85ca6..ccc8770 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -230,6 +230,7 @@ GridLinesVisibility="None" VirtualizingPanel.ScrollUnit="Pixel" PreviewMouseWheel="SmoothList_PreviewMouseWheel" + PreviewKeyDown="TrackGrid_PreviewKeyDown" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"> diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 8a69d1c..01fd067 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -403,6 +403,13 @@ public partial class MainWindow : FluentWindow /// Windows has associated with .mkv files (typically the default video /// player), so the user can quickly preview a file without leaving the app. /// + private void TrackGrid_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e) + { + if (e.Key != System.Windows.Input.Key.Space) return; + OpenSelectedFileInDefaultPlayer(); + e.Handled = true; + } + private void OpenSelectedFileInDefaultPlayer() { if (FileQueueList.SelectedItem is not QueuedFileItem item) return;