fixed space to play

This commit is contained in:
l4kr
2026-07-04 12:08:56 +02:00
parent a322b6bb00
commit e61cb5e709
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -230,6 +230,7 @@
GridLinesVisibility="None"
VirtualizingPanel.ScrollUnit="Pixel"
PreviewMouseWheel="SmoothList_PreviewMouseWheel"
PreviewKeyDown="TrackGrid_PreviewKeyDown"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto">
<DataGrid.RowStyle>
+7
View File
@@ -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.
/// </summary>
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;