diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index b40171d4..b095a6a9 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -218,6 +218,7 @@ Go to previous page Go to next page Create new page + Open preference dialog REPOSITORY Force to reload this repository Stage/Unstage selected changes diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index a1f69711..1c972de5 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -218,6 +218,7 @@ 切换到上一个页面 切换到下一个页面 新建页面 + 打开偏好设置面板 仓库页面快捷键 重新加载仓库状态 将选中的变更暂存或从暂存列表中移除 diff --git a/src/Views/Hotkeys.axaml b/src/Views/Hotkeys.axaml index 96f0a9a2..79a06cb7 100644 --- a/src/Views/Hotkeys.axaml +++ b/src/Views/Hotkeys.axaml @@ -67,21 +67,24 @@ FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=DefaultFontSize, Converter={x:Static c:FontSizeModifyConverters.Increase}}" Margin="0,0,0,8"/> - - - + + + + + + - - + + - - + + - - + + - - + + - + diff --git a/src/Views/Launcher.axaml.cs b/src/Views/Launcher.axaml.cs index 905f4207..308cf0b6 100644 --- a/src/Views/Launcher.axaml.cs +++ b/src/Views/Launcher.axaml.cs @@ -98,6 +98,15 @@ namespace SourceGit.Views protected override void OnKeyDown(KeyEventArgs e) { var vm = DataContext as ViewModels.Launcher; + + // Ctrl+Shift+P opens preference dialog (macOS use hotkeys in system menu bar) + if (!OperatingSystem.IsMacOS() && e.KeyModifiers == (KeyModifiers.Control | KeyModifiers.Shift) && e.Key == Key.P) + { + App.OpenPreferenceCommand.Execute(null); + e.Handled = true; + return; + } + if ((OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Meta)) || (!OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Control))) {