mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
enhance: use ⌘
instead of Ctrl
, ⌥
instead of Alt
for all hotkeys used by this app on macOS (#103)
This commit is contained in:
parent
9627206764
commit
68566b9b34
5 changed files with 26 additions and 19 deletions
|
@ -98,7 +98,8 @@ namespace SourceGit.Views
|
|||
protected override void OnKeyDown(KeyEventArgs e)
|
||||
{
|
||||
var vm = DataContext as ViewModels.Launcher;
|
||||
if (e.KeyModifiers.HasFlag(KeyModifiers.Control))
|
||||
if ((OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Meta)) ||
|
||||
(!OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Control)))
|
||||
{
|
||||
if (e.Key == Key.W)
|
||||
{
|
||||
|
@ -106,7 +107,14 @@ namespace SourceGit.Views
|
|||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
else if (e.Key == Key.Tab)
|
||||
else if (e.Key == Key.T)
|
||||
{
|
||||
vm.AddNewTab();
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
else if ((OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Alt) && e.Key == Key.Right) ||
|
||||
(!OperatingSystem.IsMacOS() && e.Key == Key.Tab))
|
||||
{
|
||||
vm.GotoNextTab();
|
||||
e.Handled = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue