From cb87ab921ce9b5249736c892d5c40ac45a6330f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCseyin=20Asl=C4=B1t=C3=BCrk?= Date: Thu, 23 Apr 2026 09:38:17 +0300 Subject: [PATCH 1/2] ux: keybindings for Close Blame and FileHistories windows on Escape Key pressed --- src/Views/Blame.axaml.cs | 1 + src/Views/FileHistories.axaml.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Views/Blame.axaml.cs b/src/Views/Blame.axaml.cs index 8bc36160c..24db22623 100644 --- a/src/Views/Blame.axaml.cs +++ b/src/Views/Blame.axaml.cs @@ -461,6 +461,7 @@ public partial class Blame : ChromelessWindow { public Blame() { + CloseOnESC = true; InitializeComponent(); } diff --git a/src/Views/FileHistories.axaml.cs b/src/Views/FileHistories.axaml.cs index ca0b969df..f4e82bb95 100644 --- a/src/Views/FileHistories.axaml.cs +++ b/src/Views/FileHistories.axaml.cs @@ -13,6 +13,7 @@ public partial class FileHistories : ChromelessWindow { public FileHistories() { + CloseOnESC = true; InitializeComponent(); } From a67feb709b096b8fd8269bdf6a7f29eedefe0f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCseyin=20Asl=C4=B1t=C3=BCrk?= Date: Thu, 23 Apr 2026 09:40:20 +0300 Subject: [PATCH 2/2] ux: keybindings for F2 Key to branch rename action on BranchTree --- src/Views/BranchTree.axaml.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Views/BranchTree.axaml.cs b/src/Views/BranchTree.axaml.cs index 02f40085c..7077b706d 100644 --- a/src/Views/BranchTree.axaml.cs +++ b/src/Views/BranchTree.axaml.cs @@ -582,7 +582,7 @@ private void OnTreeKeyDown(object _, KeyEventArgs e) return; } - if (e.Key is not (Key.Delete or Key.Back)) + if (e.Key is not (Key.Delete or Key.Back or Key.F2)) return; var repo = DataContext as ViewModels.Repository; @@ -593,6 +593,18 @@ private void OnTreeKeyDown(object _, KeyEventArgs e) if (selected == null || selected.Count == 0) return; + // Rename branch with F2 + if (e.Key == Key.F2 + && selected.Count == 1 + && selected[0] is ViewModels.BranchTreeNode { Backend: Models.Branch branch }) + { + if (branch.IsLocal && repo.CanCreatePopup()) + repo.ShowPopup(new ViewModels.RenameBranch(repo, branch)); + + e.Handled = true; + return; + } + if (selected.Count == 1 && selected[0] is ViewModels.BranchTreeNode { Backend: Models.Remote remote }) { repo.DeleteRemote(remote); @@ -903,6 +915,7 @@ private ContextMenu CreateContextMenuForLocalBranch(ViewModels.Repository repo, var rename = new MenuItem(); rename.Header = App.Text("BranchCM.Rename", branch.Name); rename.Icon = this.CreateMenuIcon("Icons.Rename"); + rename.Tag = "F2"; rename.Click += (_, e) => { if (repo.CanCreatePopup())