Add taskbar launch shortcuts and make powertoys shortcuts empty by default

This commit is contained in:
Aaron Junker
2025-07-27 20:09:54 +02:00
parent fe3d481407
commit 7e2fc4481d
4 changed files with 37 additions and 157 deletions

View File

@@ -1,4 +1,4 @@
PackageName: Microsoft.PowerToys
PackageName: Microsoft.PowerToys
Name: PowerToys
BackgroundProcess: True
WindowFilter: "powertoys.exe"
@@ -6,160 +6,4 @@ Shortcuts:
- SectionName: General
Properties:
# <Populate start>
- Name: Advanced Paste
Shortcut:
- Win: True
Ctrl: False
Alt: False
Shift: True
Keys:
- 86
Description: Open Advanced Paste window
- Name: Advanced Paste
Shortcut:
- Win: True
Ctrl: True
Alt: True
Shift: False
Keys:
- 86
Description: Paste as plain text directly
- Name: Advanced Paste
Shortcut:
- Win: False
Ctrl: False
Alt: False
Shift: False
Keys:
- 0
Description: Paste as markdown directly
- Name: Advanced Paste
Shortcut:
- Win: False
Ctrl: False
Alt: False
Shift: False
Keys:
- 0
Description: Paste as JSON directly
- Name: Always On Top
Shortcut:
- Win: True
Ctrl: True
Alt: False
Shift: False
Keys:
- 84
Description: Pin a window
- Name: Color Picker
Shortcut:
- Win: True
Ctrl: False
Alt: False
Shift: True
Keys:
- 67
Description: Pick a color
- Name: Crop And Lock
Shortcut:
- Win: True
Ctrl: True
Alt: False
Shift: True
Keys:
- 84
Description: Thumbnail
- Name: Crop And Lock
Shortcut:
- Win: True
Ctrl: True
Alt: False
Shift: True
Keys:
- 82
Description: Reparent
- Name: FancyZones
Shortcut:
- Win: True
Ctrl: False
Alt: False
Shift: True
Keys:
- 192
Description: Open editor
- Name: Mouse Highlight
Shortcut:
- Win: True
Ctrl: False
Alt: False
Shift: True
Keys:
- 72
Description: Highlight clicks
- Name: Mouse Jump
Shortcut:
- Win: True
Ctrl: False
Alt: False
Shift: True
Keys:
- 68
Description: Quickly move the mouse pointer
- Name: Mouse Pointer Crosshairs
Shortcut:
- Win: True
Ctrl: False
Alt: True
Shift: False
Keys:
- 80
Description: Show crosshairs
- Name: Peek
Shortcut:
- Win: False
Ctrl: True
Alt: False
Shift: False
Keys:
- 32
- Name: PowerToys Run
Shortcut:
- Win: False
Ctrl: False
Alt: True
Shift: False
Keys:
- 32
- Name: Screen Ruler
Shortcut:
- Win: True
Ctrl: True
Alt: False
Shift: True
Keys:
- 77
- Name: Shortcut Guide
Shortcut:
- Win: True
Ctrl: False
Alt: False
Shift: True
Keys:
- 191
- Name: Text Extractor
Shortcut:
- Win: True
Ctrl: False
Alt: False
Shift: True
Keys:
- 84
- Name: Workspaces
Shortcut:
- Win: True
Ctrl: True
Alt: False
Shift: False
Keys:
- 192
# <Populate end>

View File

@@ -204,6 +204,9 @@ namespace ShortcutGuide.Models
case "<Down>":
AddNewTextToStackPanel("↓");
break;
case "<TASKBAR1-9>":
AddNewTextToStackPanel("...");
break;
case "<Underlined letter>":
TextBlock animatedTextBlock = new()
{

View File

@@ -69,6 +69,18 @@
</GridView.ItemsPanel>
</GridView>
</StackPanel>
<StackPanel>
<TextBlock x:Name="TaskbarLaunchShortcutsTitle" Style="{StaticResource TitleTextBlockStyle}" Text="Taskbar launch shortcuts" Margin="6,0,6,0"></TextBlock>
<TextBlock x:Name="TaskbarLaunchShortcutsDescription" Text="Use these keys together with a number displayed below" Margin="6,0,6,0"></TextBlock>
<GridView SelectionMode="None" x:Name="TaskbarLaunchShortcutsListElement" ItemTemplate="{StaticResource ShortcutTemplate}">
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<ItemsWrapGrid Orientation="Vertical"/>
</ItemsPanelTemplate>
</GridView.ItemsPanel>
</GridView>
</StackPanel>
</StackPanel>
<GridView HorizontalContentAlignment="Left" HorizontalAlignment="Left" Height="{Binding ContentHeight}" SelectionMode="None" x:Name="ShortcutListElement" ItemTemplate="{StaticResource ShortcutTemplate}">
<GridView.ItemsPanel>

View File

@@ -225,6 +225,23 @@ namespace ShortcutGuide
ErrorMessage.Visibility = Visibility.Visible;
ErrorMessage.Text = ResourceLoaderInstance.ResourceLoader.GetString("NoShortcutsInOverview");
}
if (_showTaskbarShortcuts)
{
TaskbarLaunchShortcutsListElement.Visibility = Visibility.Visible;
TaskbarLaunchShortcutsListElement.Items.Clear();
TaskbarLaunchShortcutsTitle.Visibility = Visibility.Visible;
foreach (var item in _shortcutList.Shortcuts.First(x => x.SectionName.StartsWith("<TASKBAR1-9>", StringComparison.InvariantCulture)).Properties)
{
TaskbarLaunchShortcutsListElement.Items.Add((ShortcutTemplateDataObject)item);
}
}
else
{
TaskbarLaunchShortcutsListElement.Visibility = Visibility.Collapsed;
TaskbarLaunchShortcutsTitle.Visibility = Visibility.Collapsed;
TaskbarLaunchShortcutsDescription.Visibility = Visibility.Collapsed;
}
}
private string _searchFilter = string.Empty;
@@ -288,10 +305,14 @@ namespace ShortcutGuide
ShortcutListElement.Items.Clear();
RecommendedListElement.Items.Clear();
PinnedListElement.Items.Clear();
TaskbarLaunchShortcutsListElement.Items.Clear();
ErrorMessage.Visibility = Visibility.Collapsed;
RecommendedListElement.Visibility = Visibility.Collapsed;
PinnedListElement.Visibility = Visibility.Collapsed;
OverviewStackPanel.Visibility = Visibility.Collapsed;
TaskbarLaunchShortcutsListElement.Visibility = Visibility.Collapsed;
TaskbarLaunchShortcutsTitle.Visibility = Visibility.Collapsed;
TaskbarLaunchShortcutsDescription.Visibility = Visibility.Collapsed;
ShortcutListElement.Visibility = Visibility.Visible;
try