diff --git a/ListFiles.xaml.cs b/ListFiles.xaml.cs index ada4eff..b5c4b01 100644 --- a/ListFiles.xaml.cs +++ b/ListFiles.xaml.cs @@ -236,6 +236,26 @@ private void lstFiles_PreviewKeyDown(object sender, KeyEventArgs e) e.Handled = true; OpenSelectedFiles(Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)); } + else if (e.Key == Key.Tab) + { + var NewSelectedIndex = lstFiles.SelectedIndex + 1; + if (Keyboard.Modifiers.HasFlag(ModifierKeys.Shift)) + { + NewSelectedIndex -= 2; + } + if (NewSelectedIndex >= 0) + { + e.Handled = true; + if (NewSelectedIndex < lstFiles.Items.Count) + { + lstFiles.SelectedIndex = NewSelectedIndex; + } + else + { + lstFiles.MoveFocus(new TraversalRequest(FocusNavigationDirection.Down)); + } + } + } } private void btnSettings_Click(object sender, RoutedEventArgs e)