[AOT] Low level keyboard hook (#18643)

* low level keyboard hook for always on top

* fix for message loop

* fix spellcheck

* refactoring and cleanup

* spellcheck
This commit is contained in:
Davide Giacometti
2022-06-23 16:29:53 +02:00
committed by GitHub
parent 2159e2722e
commit 301f26aca1
7 changed files with 221 additions and 6 deletions

View File

@@ -3,7 +3,9 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Text.Json;
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
@@ -97,6 +99,14 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
Settings.Properties.Hotkey.Value = _hotkey;
NotifyPropertyChanged();
// Using InvariantCulture as this is an IPC message
SendConfigMSG(
string.Format(
CultureInfo.InvariantCulture,
"{{ \"powertoys\": {{ \"{0}\": {1} }} }}",
AlwaysOnTopSettings.ModuleName,
JsonSerializer.Serialize(Settings)));
}
}
}