mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
[Peek]Hide window with esc key (#26250)
This commit is contained in:
committed by
GitHub
parent
6f56b35a6c
commit
4560abe557
@@ -14,11 +14,11 @@
|
||||
<winuiex:WindowEx.Backdrop>
|
||||
<winuiex:MicaSystemBackdrop />
|
||||
</winuiex:WindowEx.Backdrop>
|
||||
|
||||
<Grid KeyboardAcceleratorPlacementMode="Hidden">
|
||||
<Grid.KeyboardAccelerators>
|
||||
<KeyboardAccelerator Key="Left" Invoked="LeftNavigationInvoked" />
|
||||
<KeyboardAccelerator Key="Right" Invoked="RightNavigationInvoked" />
|
||||
<KeyboardAccelerator Key="Escape" Invoked="EscKeyInvoked" />
|
||||
</Grid.KeyboardAccelerators>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@@ -69,6 +69,11 @@ namespace Peek.UI
|
||||
ViewModel.AttemptRightNavigation();
|
||||
}
|
||||
|
||||
private void EscKeyInvoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
|
||||
{
|
||||
Uninitialize();
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
var bootTime = new System.Diagnostics.Stopwatch();
|
||||
|
||||
Reference in New Issue
Block a user