From bb54c14566849fcd57d9239c550a65bc92cbc66f Mon Sep 17 00:00:00 2001 From: Hannes Braun Date: Wed, 28 Aug 2024 15:17:07 +0200 Subject: [PATCH] Add Enter as keybinding for staging/unstaging --- src/Views/WorkingCopy.axaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Views/WorkingCopy.axaml.cs b/src/Views/WorkingCopy.axaml.cs index 9cd6aa27..45e30d1d 100644 --- a/src/Views/WorkingCopy.axaml.cs +++ b/src/Views/WorkingCopy.axaml.cs @@ -62,7 +62,7 @@ namespace SourceGit.Views private void OnUnstagedKeyDown(object _, KeyEventArgs e) { - if (DataContext is ViewModels.WorkingCopy vm && e.Key == Key.Space) + if (DataContext is ViewModels.WorkingCopy vm && e.Key is Key.Space or Key.Enter) { vm.StageSelected(); e.Handled = true; @@ -71,7 +71,7 @@ namespace SourceGit.Views private void OnStagedKeyDown(object _, KeyEventArgs e) { - if (DataContext is ViewModels.WorkingCopy vm && e.Key == Key.Space) + if (DataContext is ViewModels.WorkingCopy vm && e.Key is Key.Space or Key.Enter) { vm.UnstageSelected(); e.Handled = true;