mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[Keyboard Manager] Remove service enable/disable separate from module, fix editor clear shortcut (#46530)
Two changes to shortcuts here: 1) Remove toggling the KBM service with a shortcut or via command palette 2) Ensure that shortcut is disabled for editor when shortcut is cleared
This commit is contained in:
@@ -181,34 +181,12 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
{
|
||||
var hotkeysDict = new Dictionary<string, HotkeySettings[]>
|
||||
{
|
||||
[ModuleName] = [ToggleShortcut, EditorShortcut],
|
||||
[ModuleName] = [EditorShortcut],
|
||||
};
|
||||
|
||||
return hotkeysDict;
|
||||
}
|
||||
|
||||
public HotkeySettings ToggleShortcut
|
||||
{
|
||||
get => Settings.Properties.ToggleShortcut;
|
||||
set
|
||||
{
|
||||
if (value != Settings.Properties.ToggleShortcut)
|
||||
{
|
||||
Settings.Properties.ToggleShortcut = value == null ? Settings.Properties.DefaultToggleShortcut : value;
|
||||
|
||||
OnPropertyChanged(nameof(ToggleShortcut));
|
||||
NotifySettingsChanged();
|
||||
|
||||
SendConfigMSG(
|
||||
string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{{ \"powertoys\": {{ \"{0}\": {1} }} }}",
|
||||
KeyboardManagerSettings.ModuleName,
|
||||
JsonSerializer.Serialize(Settings, SourceGenerationContextContext.Default.KeyboardManagerSettings)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool UseNewEditor
|
||||
{
|
||||
get => Settings.Properties.UseNewEditor;
|
||||
|
||||
Reference in New Issue
Block a user