From d941b31c455d9ba2c61b8c8d7e76a90a69f6ce92 Mon Sep 17 00:00:00 2001 From: Tomas Agustin Raies Date: Wed, 22 Apr 2020 14:55:45 -0700 Subject: [PATCH] Display Key Mappings in Settings (#2314) * Move changes * Display Key Mapping in Settings * Fix display of empty keys list Co-authored-by: Udit Singh --- .../EnabledModules.cs | 5 +- ...nfigModel.cs => KeyboardManagerProfile.cs} | 8 +- .../KeysDataModel.cs | 22 +++ .../RemapKeysDataModel.cs | 5 + .../SettingsUtils.cs | 2 +- .../ShortcutsKeyDataModel.cs | 5 + .../Assets/logo.png | Bin 0 -> 3012 bytes .../Assets/logo150.png | Bin 0 -> 2223 bytes .../Assets/logo44.png | Bin 0 -> 1638 bytes .../Microsoft.PowerToys.Settings.UI.csproj | 3 +- .../ViewModels/KeyboardManagerViewModel.cs | 127 ++++++++++++++-- .../ViewModels/Keys.cs | 13 -- .../ViewModels/RemapKeysModel.cs | 24 --- .../Views/KeyboardManagerPage.xaml | 137 +++++++++++------- .../Views/VisibleIfNotEmpty.cs | 24 +++ ...crosoft.PowerToys.Settings.UnitTest.csproj | 12 +- 16 files changed, 269 insertions(+), 118 deletions(-) rename src/core/Microsoft.PowerToys.Settings.UI.Lib/{KeyboadManagerConfigModel.cs => KeyboardManagerProfile.cs} (69%) create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/Assets/logo.png create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/Assets/logo150.png create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/Assets/logo44.png delete mode 100644 src/core/Microsoft.PowerToys.Settings.UI/ViewModels/Keys.cs delete mode 100644 src/core/Microsoft.PowerToys.Settings.UI/ViewModels/RemapKeysModel.cs create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/Views/VisibleIfNotEmpty.cs diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Lib/EnabledModules.cs b/src/core/Microsoft.PowerToys.Settings.UI.Lib/EnabledModules.cs index 8ade31aac7..549c89023d 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Lib/EnabledModules.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Lib/EnabledModules.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -32,6 +32,9 @@ namespace Microsoft.PowerToys.Settings.UI.Lib public bool PowerRename { get; set; } + [JsonPropertyName("Keyboard Manager")] + public bool KeyboardManager { get; set; } + public string ToJsonString() { return JsonSerializer.Serialize(this); diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Lib/KeyboadManagerConfigModel.cs b/src/core/Microsoft.PowerToys.Settings.UI.Lib/KeyboardManagerProfile.cs similarity index 69% rename from src/core/Microsoft.PowerToys.Settings.UI.Lib/KeyboadManagerConfigModel.cs rename to src/core/Microsoft.PowerToys.Settings.UI.Lib/KeyboardManagerProfile.cs index 0b3d6c2377..00d1ff60e9 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Lib/KeyboadManagerConfigModel.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Lib/KeyboardManagerProfile.cs @@ -7,12 +7,18 @@ using System.Text.Json.Serialization; namespace Microsoft.PowerToys.Settings.UI.Lib { - public class KeyboadManagerConfigModel + public class KeyboardManagerProfile { [JsonPropertyName("remapKeys")] public RemapKeysDataModel RemapKeys { get; set; } [JsonPropertyName("remapShortcuts")] public ShortcutsKeyDataModel RemapShortcuts { get; set; } + + public KeyboardManagerProfile() + { + RemapKeys = new RemapKeysDataModel(); + RemapShortcuts = new ShortcutsKeyDataModel(); + } } } diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Lib/KeysDataModel.cs b/src/core/Microsoft.PowerToys.Settings.UI.Lib/KeysDataModel.cs index 2b66cbc8ab..d9140f7da8 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Lib/KeysDataModel.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Lib/KeysDataModel.cs @@ -2,6 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using Microsoft.PowerToys.Settings.UI.Lib.Utilities; +using System.Collections.Generic; +using System.Linq; using System.Text.Json.Serialization; namespace Microsoft.PowerToys.Settings.UI.Lib @@ -13,5 +16,24 @@ namespace Microsoft.PowerToys.Settings.UI.Lib [JsonPropertyName("newRemapKeys")] public string NewRemapKeys { get; set; } + + private List MapKeys(string stringOfKeys) + { + return stringOfKeys + .Split(';') + .Select(uint.Parse) + .Select(Helper.GetKeyName) + .ToList(); + } + + public List GetOriginalKeys() + { + return MapKeys(OriginalKeys); + } + + public List GetNewRemapKeys() + { + return MapKeys(NewRemapKeys); + } } } diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Lib/RemapKeysDataModel.cs b/src/core/Microsoft.PowerToys.Settings.UI.Lib/RemapKeysDataModel.cs index af376a648c..67477c4214 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Lib/RemapKeysDataModel.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Lib/RemapKeysDataModel.cs @@ -11,5 +11,10 @@ namespace Microsoft.PowerToys.Settings.UI.Lib { [JsonPropertyName("inProcess")] public List InProcessRemapKeys { get; set; } + + public RemapKeysDataModel() + { + InProcessRemapKeys = new List(); + } } } \ No newline at end of file diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Lib/SettingsUtils.cs b/src/core/Microsoft.PowerToys.Settings.UI.Lib/SettingsUtils.cs index aea23689c6..abc6c1cd9d 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Lib/SettingsUtils.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Lib/SettingsUtils.cs @@ -41,7 +41,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib $"Microsoft\\PowerToys\\{powertoy}\\{fileName}"); } - public static bool SettingsExists(string powertoy, string fileName = DefaultFileName) + public static bool SettingsExists(string powertoy = DefaultModuleName, string fileName = DefaultFileName) { return File.Exists(GetSettingsPath(powertoy, fileName)); } diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Lib/ShortcutsKeyDataModel.cs b/src/core/Microsoft.PowerToys.Settings.UI.Lib/ShortcutsKeyDataModel.cs index 7b75a86b11..ad245f4808 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Lib/ShortcutsKeyDataModel.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Lib/ShortcutsKeyDataModel.cs @@ -11,5 +11,10 @@ namespace Microsoft.PowerToys.Settings.UI.Lib { [JsonPropertyName("global")] public List GlobalRemapShortcuts { get; set; } + + public ShortcutsKeyDataModel() + { + GlobalRemapShortcuts = new List(); + } } } diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Assets/logo.png b/src/core/Microsoft.PowerToys.Settings.UI/Assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..8495aaf09df5bf80a6f8bf0f28e9d5ca7a4e80d1 GIT binary patch literal 3012 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBK4*bPWHAE+-w_aIoT|+y&A`AN>FMGaQW5v|itQ=4=#8!qoBtXZ8C_uG zU{gvfvTV%V;GM=cOR_6gAg?Gmy5MhT&l!7b11`1oM@s_Jbt*2MHACr25ugQcE%YOYt?uTFfm_9WJoKS&&j;u07HpHgXG=xLkv0w467MX zG2NPFz|cKv)bI~0dZbH8k}ou3*s`^8G~tcrED}l~3rU8TyW40~UXouFe>{7={=mdKI;Vst04<%MbpQYW literal 0 HcmV?d00001 diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Assets/logo150.png b/src/core/Microsoft.PowerToys.Settings.UI/Assets/logo150.png new file mode 100644 index 0000000000000000000000000000000000000000..3186a7299688b6a77eda5194d35e402659f41726 GIT binary patch literal 2223 zcmd5;XHXN^77n{YClhF;d_445yj1cneo-f`-^M zewOKC9Qy%pl-Me$&~#QqO1&FjWS5w6&oe*F!bJU$@ey=;SG<$O`IBcvEE1~I$fVZ0 zE-vZp(qhT6^07rdr(A8Voqd|Q4)F84`N91~Qn_9sBN60I_cnN03eLr${C`(LYvG>> z)?Nn|_D^Kgd4~+{A5Bl9DM%caEcUE|^W)5vq@eae?FD<~ah|?WQubw@tlc)$7HFCf4?MjeA$eBUIQQsRk{+RR;Z?U2{6ETW^lJ8ntfkn zgjFHM(?bJGU76FD3Runr2dvVhI|B(rQ_SiIVUh*OTb*8VHWv4zcc?;ha@ywF z+&SxKi9!h;Fic@e#x{ypuW^CD)zOW?jLnuOeeClNW`5-(7vTduxeC{#q`Q#y0_v zs&kH~Hm4or=Rc(G|743-!6EeyH}!VEBeSX(@7NITdX+Uk!jy-LJCE~?D?2zGEA`9t z3P1==ok$e7!YGuQD0bB_zjI?GxcLvqg+lUNma2bUFIl)cV{$_Ggg!sz2T~r8BPNrJ zH#fTW1(>{CaeoNIRR;6KU#PgX&< zz&{NLw@+t4Ol9e$J$5-<_5N|kN!K0{1d{G?ClwquT{mQ+HW?&qeTFZz5$9c2H=B(1 z0Mnf_#3iLtz7A-6Nk7$Ss9<6=r17y1b7u~>*J#5=diw&;8%L{Kb~#Cgvp5@=vPH5{ z&i24XYn(jE8nO`qVyiXBEWVc6B@p#dtUcOfgJ`p~9p= zS~?I-@X=lrch+6gye=zQF9*vth~k#QJZ}~^ixl7mO5e)GVYRC61Y{n5Q_}lDqD-g{ zq1NLYS{rd#agTQa?eWMo*fmg>t=r_^M0x%EMz^aU2DZ4mUrC9J8oYVWZUPI;KWjZK zH@0FeRaf`R=19Tashun1S-EASPwwS3e8CCEAb9BE6iADxj5PcrQBHYdM?|uAR#P%B zQsnU2`z#1D>(P0|@sy1c?w8w^F!OS9f zdPApC>3*|QR~?7aWj{PITC|`?jP=|5UQxJ3JUG!)J==4=g>16ln{naoxFKJQw@cVHeXt2%gJC^^n^nJ&=6xi107#fcq&va;6 zn(55o{`^{U2bnVc2uMx160qFeDBfVU(N51j=Y!uS2#`!wg|$x>-j`WokPA3zqX>2c zMO3M7LX2#1y!b)~G61Fe^+8WkUql~$UMyFs2I3ZK%ph{elk#J6w=PL;cjNMnLPsL< zm~Vo)eaarU+$Sxa=|mq^rMyIU2cqHxIqh`4PoyQhJ_*X7vmQC3=NQuDKWQa}XFriq z3X*qD?J10fs;S!h+5ecAh7Im%B6Jk0$P4M{%^(ykI-#fJ8`Uqa0j#2 z>PW8;5q9hPAp*LGT5t)N5(!C}cpJX5u=nW-Tf{MYgv)8eEJ;L+Mg~B{qL+O?)nvSN zZX{V$4HGIp_@nj=1aJp~O_8XdGa_z&Qnh7Gf3tS2RXAR>LYMGiL|?ao+g)?|JqV{Q zEw=KxlWkqKK#fikP0>xd>>nDq-HW|xrNdpbJs86O(4jy3jsImdKpgt!K4XUy%==^j NEX-_8D@;6N{s3hoDEt5b literal 0 HcmV?d00001 diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Assets/logo44.png b/src/core/Microsoft.PowerToys.Settings.UI/Assets/logo44.png new file mode 100644 index 0000000000000000000000000000000000000000..cbc9822292830cd3061d132794c86a092564887e GIT binary patch literal 1638 zcmV-s2ATPZP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf1^Y=vK~z{r?OAPa z6jc;{=4E%g+ugR5wouws2%w^%Bt{Ch#3&L2Mq<(&qvoo{v;yHJArZd~6Ta+fN>61R4J2Pj_Jonr)XYZYnTmlI5 za}&r;T!Es-dADKU*cMtl`p~=WHL)KE&Og3~*{NYDN`nb@EM(gIu&MVIu`fNEyW^^A z4C7+8ot8IY2bPKnnAbIpYpg2JYQ<9AnS}*RF6{y}JD3XCG;}Eju0cxA# zm?JA_$z`!;O(w!&%MEQr>PFq$`3#IKCH zD-K$vB1`9;>J^4YGp-0+I5}Ft+Dmpk8lAF%q#PC^At5awE-zO0Jy>c2T64#;`Px&@ zhg}l7u~0(CVll#Q*+LIRcZm+Rv}x#S%Lm-lmV?qt)5mraOi}h|L*LMXznZ!te5|%U zn+TV56K@Xe;c$^Z&taVGheyXyEb5SHj?A!a8(p0n@ci~3SUle)@VTO<JD;iDX@6KRl4B}njf>JaT$=S2v0 zQ-Uw%NU(?!Q7h@tG($wG8XQ@+2~(#C)q?O-vGKR7$cX=89p+y1(5kewXU0^Os6_J2 zhfHfd-_EC^)V_sEeyVL($bI1OK%%1%69A+>9#guKkIx>G(Pb`{oexeRq9 ztWh2P;JpFS_Uka)|NQGH7IMWPN4Y}u^>$+Ko*gKcEpd!Hkk1!!=KNJOCA`q>Xc`s#2AP4H?sf*O1XHbW^m%2`*E$66CbZXUM63yq> zPLQrK>EWyeVdvY5ttl!}J*+B+8wqsh%Zh|Y^NYAV@@HVjlb)Mn(?X07zJg2F z#i2g}yOC?RF+|sK{;ib1j8)ZPo&fn3!bejw9{E9FaCP8(4@0J?SNmjN1@aluMms60 z?bRdqkLoZN{&YGSVYOHW4{x - - @@ -105,6 +103,7 @@ ShortcutGuidePage.xaml + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/KeyboardManagerViewModel.cs b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/KeyboardManagerViewModel.cs index b27689b62c..7604231ab2 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/KeyboardManagerViewModel.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/KeyboardManagerViewModel.cs @@ -3,7 +3,9 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Generic; using System.IO; +using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows.Input; @@ -11,6 +13,9 @@ using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Lib; using Microsoft.PowerToys.Settings.UI.Lib.Utilities; using Microsoft.PowerToys.Settings.UI.Views; +using Microsoft.Toolkit.Uwp.Helpers; +using Windows.UI.Core; +using Windows.UI.Xaml; namespace Microsoft.PowerToys.Settings.UI.ViewModels { @@ -22,24 +27,31 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels private const string EditShortcutActionName = "EditShortcut"; private const string EditShortcutActionValue = "Open Edit Shortcut Window"; private const string JsonFileType = ".json"; - private const string ConfigFileMutexName = "PowerToys.KeyboardManager.ConfigMutex"; - private const int ConfigFileMutexWaitTimeoutMiliSeconds = 1000; + private const string ProfileFileMutexName = "PowerToys.KeyboardManager.ConfigMutex"; + private const int ProfileFileMutexWaitTimeoutMilliseconds = 1000; + + private readonly CoreDispatcher dispatcher; + private readonly FileSystemWatcher watcher; private ICommand remapKeyboardCommand; private ICommand editShortcutCommand; - private FileSystemWatcher watcher; private KeyboardManagerSettings settings; - - public ICommand RemapKeyboardCommand => remapKeyboardCommand ?? (remapKeyboardCommand = new RelayCommand(OnRemapKeyboard)); - - public ICommand EditShortcutCommand => editShortcutCommand ?? (editShortcutCommand = new RelayCommand(OnEditShortcut)); + private KeyboardManagerProfile profile; + private GeneralSettings generalSettings; public KeyboardManagerViewModel() { + dispatcher = Window.Current.Dispatcher; if (SettingsUtils.SettingsExists(PowerToyName)) { // Todo: Be more resillent while reading and saving settings. settings = SettingsUtils.GetSettings(PowerToyName); + + // Load profile. + if (!LoadProfile()) + { + profile = new KeyboardManagerProfile(); + } } else { @@ -47,9 +59,78 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels SettingsUtils.SaveSettings(settings.ToJsonString(), PowerToyName); } - watcher = Helper.GetFileWatcher(PowerToyName, settings.Properties.ActiveConfiguration.Value + JsonFileType, OnConfigFileUpdate); + if (SettingsUtils.SettingsExists()) + { + generalSettings = SettingsUtils.GetSettings(string.Empty); + } + else + { + generalSettings = new GeneralSettings(); + SettingsUtils.SaveSettings(generalSettings.ToJsonString(), string.Empty); + } + + watcher = Helper.GetFileWatcher( + PowerToyName, + settings.Properties.ActiveConfiguration.Value + JsonFileType, + OnConfigFileUpdate); + } + public bool Enabled + { + get + { + return generalSettings.Enabled.KeyboardManager; + } + + set + { + if (generalSettings.Enabled.KeyboardManager != value) + { + generalSettings.Enabled.KeyboardManager = value; + OnPropertyChanged(nameof(Enabled)); + OutGoingGeneralSettings outgoing = new OutGoingGeneralSettings(generalSettings); + + ShellPage.DefaultSndMSGCallback(outgoing.ToString()); + } + } + } + + // store remappings + public List RemapKeys + { + get + { + if (profile != null) + { + return profile.RemapKeys.InProcessRemapKeys; + } + else + { + return new List(); + } + } + } + + public List RemapShortcuts + { + get + { + if (profile != null) + { + return profile.RemapShortcuts.GlobalRemapShortcuts; + } + else + { + return new List(); + } + } + } + + public ICommand RemapKeyboardCommand => remapKeyboardCommand ?? (remapKeyboardCommand = new RelayCommand(OnRemapKeyboard)); + + public ICommand EditShortcutCommand => editShortcutCommand ?? (editShortcutCommand = new RelayCommand(OnEditShortcut)); + private async void OnRemapKeyboard() { await Task.Run(() => OnRemapKeyboardBackground()); @@ -74,38 +155,54 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels await Task.CompletedTask; } - private void OnConfigFileUpdate() + private async void OnConfigFileUpdate() { // Note: FileSystemWatcher raise notification mutiple times for single update operation. // Todo: Handle duplicate events either by somehow supress them or re-read the configuration everytime since we will be updating the UI only if something is changed. - GetKeyboardManagerConfigFile(); + if (LoadProfile()) + { + await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => + { + OnPropertyChanged(nameof(RemapKeys)); + OnPropertyChanged(nameof(RemapShortcuts)); + }); + } } - private void GetKeyboardManagerConfigFile() + private bool LoadProfile() { + var success = true; + try { - using (var configFileMutex = Mutex.OpenExisting(ConfigFileMutexName)) + using (var profileFileMutex = Mutex.OpenExisting(ProfileFileMutexName)) { - if (configFileMutex.WaitOne(ConfigFileMutexWaitTimeoutMiliSeconds)) + if (profileFileMutex.WaitOne(ProfileFileMutexWaitTimeoutMilliseconds)) { // update the UI element here. try { - var config = SettingsUtils.GetSettings(PowerToyName, settings.Properties.ActiveConfiguration.Value + JsonFileType); + profile = SettingsUtils.GetSettings(PowerToyName, settings.Properties.ActiveConfiguration.Value + JsonFileType); } finally { // Make sure to release the mutex. - configFileMutex.ReleaseMutex(); + profileFileMutex.ReleaseMutex(); } } + else + { + success = false; + } } } catch (Exception) { // Failed to load the configuration. + success = false; } + + return success; } } } diff --git a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/Keys.cs b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/Keys.cs deleted file mode 100644 index 34610dfd47..0000000000 --- a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/Keys.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Microsoft.PowerToys.Settings.UI.ViewModels -{ - public class Keys - { - public string From { get; set; } - - public string To { get; set; } - } -} diff --git a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/RemapKeysModel.cs b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/RemapKeysModel.cs deleted file mode 100644 index 7c64ca91c9..0000000000 --- a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/RemapKeysModel.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Collections.ObjectModel; - -namespace Microsoft.PowerToys.Settings.UI.ViewModels -{ - // Dummy data model for the UI. Will be removed moving forward. - public class RemapKeysModel : ObservableCollection - { - public RemapKeysModel() - { - Add(new Keys { From = "A", To = "B" }); - Add(new Keys { From = "B", To = "A" }); - Add(new Keys { From = "Ctrl", To = "Shift" }); - Add(new Keys { From = "Shift", To = "Ctrl" }); - Add(new Keys { From = "A", To = "B" }); - Add(new Keys { From = "B", To = "B" }); - Add(new Keys { From = "Ctrl", To = "Shift" }); - Add(new Keys { From = "Shift", To = "Ctrl" }); - } - } -} diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/KeyboardManagerPage.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Views/KeyboardManagerPage.xaml index e5d085d625..b1efe75cff 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Views/KeyboardManagerPage.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/KeyboardManagerPage.xaml @@ -7,58 +7,79 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:viewModel="using:Microsoft.PowerToys.Settings.UI.ViewModels" xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions" + xmlns:Lib="using:Microsoft.PowerToys.Settings.UI.Lib" mc:Ignorable="d" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - + VerticalAlignment="Center" + Margin="5,0,5,0"/> + + + + + + + + + + + + + + + @@ -99,7 +120,7 @@ TextWrapping="Wrap"/> \ No newline at end of file