File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -527,13 +527,13 @@ await MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(async () =>
527527
528528 public void PathBoxItem_PreviewKeyDown ( object sender , KeyRoutedEventArgs e )
529529 {
530- if ( e . Key == Windows . System . VirtualKey . Down )
530+ if ( e . Key is Windows . System . VirtualKey . Down )
531531 {
532532 var item = e . OriginalSource as ListViewItem ;
533533 var button = item ? . FindDescendant < Button > ( ) ;
534534 button ? . Flyout . ShowAt ( button ) ;
535535 e . Handled = true ;
536- } else if ( e . Key == Windows . System . VirtualKey . Space || e . Key == Windows . System . VirtualKey . Enter )
536+ } else if ( e . Key is Windows . System . VirtualKey . Space or Windows . System . VirtualKey . Enter )
537537 {
538538 var item = e . OriginalSource as ListViewItem ;
539539 var path = ( item ? . Content as PathBoxItem ) ? . Path ;
Original file line number Diff line number Diff line change @@ -235,13 +235,20 @@ private async Task OnPreviewKeyDownAsync(KeyRoutedEventArgs e)
235235 default :
236236 var currentModifiers = HotKeyHelpers . GetCurrentKeyModifiers ( ) ;
237237 HotKey hotKey = new ( ( Keys ) e . Key , currentModifiers ) ;
238+ var source = ( DependencyObject ) e . OriginalSource ;
238239
239240 // A textbox takes precedence over certain hotkeys.
240- if ( e . OriginalSource is DependencyObject source && source . FindAscendantOrSelf < TextBox > ( ) is not null )
241+ if ( source . FindAscendantOrSelf < TextBox > ( ) is not null )
241242 break ;
242243
243244 // Execute command for hotkey
244245 var command = Commands [ hotKey ] ;
246+
247+ if ( command . Code is CommandCodes . OpenItem && source . FindAscendantOrSelf < PathBreadcrumb > ( ) is not null )
248+ {
249+ break ;
250+ }
251+
245252 if ( command . Code is not CommandCodes . None && keyReleased )
246253 {
247254 keyReleased = false ;
You can’t perform that action at this time.
0 commit comments