Adding hotkeys for creating branch, pushing and pulling (#657)

This commit is contained in:
Fernando Medeiros 2024-11-06 01:14:56 +00:00 committed by GitHub
parent fdf30aa7cc
commit 2e6eca26f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 47 additions and 12 deletions

View file

@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Text;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Platform.Storage;
using CommunityToolkit.Mvvm.ComponentModel;
@ -544,6 +545,7 @@ namespace SourceGit.ViewModels
var createBranch = new MenuItem();
createBranch.Icon = App.CreateMenuIcon("Icons.Branch.Add");
createBranch.Header = App.Text("CreateBranch");
createBranch.HotKey = new KeyGesture(Key.B, KeyModifiers.Control);
createBranch.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())