mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
Announce automatically corrected HotKey (#12362)
This commit is contained in:
@@ -7,6 +7,7 @@ using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Windows.UI.Core;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Automation.Peers;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||
@@ -277,6 +278,22 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||
}
|
||||
|
||||
HotkeyTextBox.Text = hotkeySettings.ToString();
|
||||
if (AutomationPeer.ListenerExists(AutomationEvents.PropertyChanged))
|
||||
{
|
||||
TextBoxAutomationPeer peer =
|
||||
FrameworkElementAutomationPeer.FromElement(HotkeyTextBox) as TextBoxAutomationPeer;
|
||||
string textBoxChangeActivityId = "textBoxChangedOnLosingFocus";
|
||||
|
||||
if (peer != null)
|
||||
{
|
||||
peer.RaiseNotificationEvent(
|
||||
AutomationNotificationKind.ActionCompleted,
|
||||
AutomationNotificationProcessing.ImportantMostRecent,
|
||||
HotkeyTextBox.Text,
|
||||
textBoxChangeActivityId);
|
||||
}
|
||||
}
|
||||
|
||||
_isActive = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user