[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:
Zach Teutsch
2026-03-26 13:20:50 -04:00
committed by GitHub
parent c05ba4e2c8
commit dc533fbdb3
15 changed files with 27 additions and 245 deletions

View File

@@ -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;