mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 02:06:36 +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:
@@ -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")]
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user