[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

@@ -21,20 +21,15 @@ namespace Microsoft.PowerToys.Settings.UI.Library
[CmdConfigureIgnoreAttribute]
public GenericProperty<List<string>> KeyboardConfigurations { get; set; }
public HotkeySettings DefaultToggleShortcut => new HotkeySettings(true, false, false, true, 0x4B);
public HotkeySettings DefaultEditorShortcut => new HotkeySettings(true, false, false, true, 0x51);
public KeyboardManagerProperties()
{
ToggleShortcut = DefaultToggleShortcut;
EditorShortcut = DefaultEditorShortcut;
KeyboardConfigurations = new GenericProperty<List<string>>(new List<string> { "default", });
ActiveConfiguration = new GenericProperty<string>("default");
}
public HotkeySettings ToggleShortcut { get; set; }
public HotkeySettings EditorShortcut { get; set; }
[JsonPropertyName("useNewEditor")]

View File

@@ -38,10 +38,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library
{
var hotkeyAccessors = new List<HotkeyAccessor>
{
new HotkeyAccessor(
() => Properties.ToggleShortcut,
value => Properties.ToggleShortcut = value ?? Properties.DefaultToggleShortcut,
"Toggle_Shortcut"),
new HotkeyAccessor(
() => Properties.EditorShortcut,
value => Properties.EditorShortcut = value ?? Properties.DefaultEditorShortcut,