Skip to content

Commit 39e8231

Browse files
authored
[CmdPal] Windows Services restart kb shortcuts (#38150)
* [CmdPal] Windows Services open/restart kb shortcuts * Given both restart and stop has its shortcut, only do for open with the shortcut "ctr+o"
1 parent 2cb63f5 commit 39e8231

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/Helpers/ServiceHelper.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using Microsoft.CommandPalette.Extensions;
1414
using Microsoft.CommandPalette.Extensions.Toolkit;
1515
using Microsoft.Win32;
16+
using Windows.System;
1617

1718
namespace Microsoft.CmdPal.Ext.WindowsServices.Helpers;
1819

@@ -53,7 +54,10 @@ public static IEnumerable<ListItem> Search(string search)
5354
serviceCommand = new ServiceCommand(serviceResult, Action.Stop);
5455
moreCommands = [
5556
new CommandContextItem(new RestartServiceCommand(serviceResult)),
56-
new CommandContextItem(new OpenServicesCommand(serviceResult)),
57+
new CommandContextItem(new OpenServicesCommand(serviceResult))
58+
{
59+
RequestedShortcut = KeyChordHelpers.FromModifiers(true, false, false, false, (int)VirtualKey.O, 0),
60+
},
5761
];
5862
}
5963
else

src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.resx

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
<value>Name</value>
128128
</data>
129129
<data name="wox_plugin_service_open_services" xml:space="preserve">
130-
<value>Open services (Ctrl+O)</value>
130+
<value>Open services</value>
131131
</data>
132132
<data name="wox_plugin_service_paused" xml:space="preserve">
133133
<value>Paused</value>
@@ -142,7 +142,7 @@
142142
<value>Service</value>
143143
</data>
144144
<data name="wox_plugin_service_restart" xml:space="preserve">
145-
<value>Restart (Ctrl+R)</value>
145+
<value>Restart</value>
146146
</data>
147147
<data name="wox_plugin_service_restarted_notification" xml:space="preserve">
148148
<value>The service has been restarted</value>

0 commit comments

Comments
 (0)