implemented ctrl + w to close peek. (#29895)

* ctrl + w to close peek

* Update MainWindow.xaml

* Update MainWindow.xaml.cs

* Update MainWindow.xaml

* Update MainWindow.xaml

CloseInvoked

* Update MainWindow.xaml.cs

EscInvoked -> CloseInvoked

* Update MainWindow.xaml.cs

XAML Styler extension
This commit is contained in:
Physalis
2023-11-19 16:36:12 +01:00
committed by GitHub
parent 7d9681ecd2
commit 67b18d0e98
2 changed files with 6 additions and 2 deletions

View File

@@ -22,7 +22,11 @@
<KeyboardAccelerator Key="Up" Invoked="PreviousNavigationInvoked" />
<KeyboardAccelerator Key="Right" Invoked="NextNavigationInvoked" />
<KeyboardAccelerator Key="Down" Invoked="NextNavigationInvoked" />
<KeyboardAccelerator Key="Escape" Invoked="EscKeyInvoked" />
<KeyboardAccelerator Key="Escape" Invoked="CloseInvoked" />
<KeyboardAccelerator
Key="W"
Invoked="CloseInvoked"
Modifiers="Control" />
</Grid.KeyboardAccelerators>
<Grid.RowDefinitions>

View File

@@ -116,7 +116,7 @@ namespace Peek.UI
ViewModel.AttemptNextNavigation();
}
private void EscKeyInvoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
private void CloseInvoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
{
Uninitialize();
}