From 9514ca53949b4f602cda043f235d663fe3a1e229 Mon Sep 17 00:00:00 2001 From: Zach Teutsch <88554871+zateutsch@users.noreply.github.com> Date: Sun, 22 Feb 2026 21:53:27 -0500 Subject: [PATCH] Address review comments: remove unused image, add program display for urls/programs, add tooltip for program shorcut advanced args, localize strings --- .github/actions/spell-check/expect.txt | 2 + .../Assets/KeyboardManagerEditor/kbm.jpg | Bin 5034 -> 0 bytes .../Helpers/ProgramShortcut.cs | 13 ++ .../Helpers/URLShortcut.cs | 4 + .../Pages/MainPage.xaml | 149 ++++++++++-------- .../Pages/MainPage.xaml.cs | 11 +- .../Strings/en-US/Resources.resw | 112 +++++++++++++ 7 files changed, 227 insertions(+), 64 deletions(-) delete mode 100644 src/modules/keyboardmanager/KeyboardManagerEditorUI/Assets/KeyboardManagerEditor/kbm.jpg diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 0e5f8a7e3f..04c46b7eeb 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -204,6 +204,7 @@ comdlg comexp cominterop commandpalette +commoncontrols compmgmt COMPOSITIONFULL CONFIGW @@ -673,6 +674,7 @@ jpnime Jsons jsonval jxr +kbmcontrols keybd KEYBDDATA KEYBDINPUT diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorUI/Assets/KeyboardManagerEditor/kbm.jpg b/src/modules/keyboardmanager/KeyboardManagerEditorUI/Assets/KeyboardManagerEditor/kbm.jpg deleted file mode 100644 index 46d0c96f6f03fa3e6b6e994633eb82bf22e7951e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5034 zcmdT|dpOkFyI*5mLn3q=O-44ER4yf{Mr@Rl3{tL@E;5n3PQKNCcL~S8M zrjm#vxlB<+E`u!7j&)Ls&&iU{6o#*>JYt3h^cfFr?z3*qO8T2js5iBq@ z-eC+d7z{W7KLBk5hCozUSVUMzR76BXOiXm1gsh~5xVXd;nT1la3QO_J6_(;~D^{*i z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`gkCm|rf#2^DjPnP>t`hg~zL88}GZJ3dX=^w;>7FSpZkk_^sVfYOwSoqv_K`lQ4a z9M!t%&|)8(cNz_OH8)!DM5pLvVnHk-~0|5z_x0_j!` zniYOdo!t$S1Nj>!V)zA2;uml#>*ne0{7t9L74Slb`Vd)314pheRln-6C$hkLgOgsj8{#=u}m# zcxCo7!xP^j#I9}?ipTsbyK5zaH|8=vOxLI^fJ=YUDeux8Bc4%}%Nf`GYW41o{+82-Z937j|IeXB{J8Iogz>1&cakK&%C#sW)u+mb1gFB>V(ucF~^(bu}!M^ zYk5uZ)TL!1!`Y<5lPKu>42^{g)$gH~F{k#TfOobB8iDKlf?3eZN`JwkvK*^R9ea(J zU&_2^U(&UT?BMDZx&n8!6fe2!Dm(g;uIdJwv!f^3&~tsMe2B3@V7zvvcS~meYF;xF zE?x4srQ<`ro7nlpU!nY;Ue(n=W6Z+5k%`T33gmXdzapD7Nv zUpWW`_ACx7la)BVhU_ceiwzDFgA8(-h`R2_70%z=Y~6{1p`k5%HRXG8*Dm+hTX5!e z&{I>M4Ewab+GLQpXY*m4*T(ha@(c9*q)5v?29a&5+Be^_FPq4=ooU=4vR!8yR3bZY zwqeR4P<1QfCfl!;U#3TTbZ_-b&8KIkB + - + @@ -108,17 +108,17 @@ Foreground="{ThemeResource TextFillColorSecondaryBrush}" Glyph="" /> @@ -131,9 +131,9 @@ + Style="{StaticResource BodyStrongTextBlockStyle}" /> + Foreground="{ThemeResource TextFillColorSecondaryBrush}" /> @@ -186,9 +186,9 @@ Spacing="8" Visibility="{x:Bind AppName, Converter={StaticResource StringVisibilityConverter}}"> + Foreground="{ThemeResource TextFillColorSecondaryBrush}" /> @@ -208,11 +208,11 @@ + Tag="{x:Bind}" /> @@ -226,9 +226,9 @@ + Style="{StaticResource BodyStrongTextBlockStyle}" /> + Foreground="{ThemeResource TextFillColorSecondaryBrush}" /> + Foreground="{ThemeResource TextFillColorSecondaryBrush}" /> @@ -296,11 +296,11 @@ + Tag="{x:Bind}" /> @@ -314,9 +314,9 @@ + Style="{StaticResource BodyStrongTextBlockStyle}" /> + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -350,25 +379,23 @@ + Foreground="{ThemeResource TextFillColorSecondaryBrush}" /> - - - + + + + + Tag="{x:Bind}" /> @@ -405,9 +432,9 @@ + Style="{StaticResource BodyStrongTextBlockStyle}" /> + Foreground="{ThemeResource TextFillColorSecondaryBrush}" /> - + + + + + Tag="{x:Bind}" /> @@ -499,27 +526,23 @@ + PrimaryButtonStyle="{StaticResource AccentButtonStyle}"> - + x:Uid="DeleteConfirmationDialog" + DefaultButton="Primary"> + diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorUI/Pages/MainPage.xaml.cs b/src/modules/keyboardmanager/KeyboardManagerEditorUI/Pages/MainPage.xaml.cs index ae79ab5626..91b30285ca 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorUI/Pages/MainPage.xaml.cs +++ b/src/modules/keyboardmanager/KeyboardManagerEditorUI/Pages/MainPage.xaml.cs @@ -936,6 +936,12 @@ namespace KeyboardManagerEditorUI.Pages Args = mapping.ProgramArgs, IsActive = shortcutSettings.IsActive, Id = shortcutSettings.Id, + IsAllApps = string.IsNullOrEmpty(mapping.TargetApp), + AppName = string.IsNullOrEmpty(mapping.TargetApp) ? string.Empty : mapping.TargetApp, + StartInDirectory = mapping.StartInDirectory, + Elevation = mapping.Elevation.ToString(), + IfRunningAction = mapping.IfRunningAction.ToString(), + Visibility = mapping.Visibility.ToString(), }); } } @@ -951,6 +957,7 @@ namespace KeyboardManagerEditorUI.Pages foreach (var shortcutSettings in SettingsManager.GetShortcutSettingsByOperationType(ShortcutOperationType.OpenUri)) { + ShortcutKeyMapping mapping = shortcutSettings.Shortcut; string[] originalKeyCodes = shortcutSettings.Shortcut.OriginalKeys.Split(';'); var originalKeyNames = new List(); foreach (var keyCode in originalKeyCodes) @@ -964,9 +971,11 @@ namespace KeyboardManagerEditorUI.Pages UrlShortcuts.Add(new URLShortcut { Shortcut = originalKeyNames, - URL = shortcutSettings.Shortcut.UriToOpen, + URL = mapping.UriToOpen, Id = shortcutSettings.Id, IsActive = shortcutSettings.IsActive, + IsAllApps = string.IsNullOrEmpty(mapping.TargetApp), + AppName = string.IsNullOrEmpty(mapping.TargetApp) ? string.Empty : mapping.TargetApp, }); } } diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorUI/Strings/en-US/Resources.resw b/src/modules/keyboardmanager/KeyboardManagerEditorUI/Strings/en-US/Resources.resw index 1af7de150c..9216e586ce 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorUI/Strings/en-US/Resources.resw +++ b/src/modules/keyboardmanager/KeyboardManagerEditorUI/Strings/en-US/Resources.resw @@ -117,4 +117,116 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Add new remapping + Button text to create a new keyboard remapping + + + + + Nothing mapped yet + Title shown when no mappings exist + + + Create a key or shortcut remapping to customize how your keyboard works. + Description shown when no mappings exist + + + + + Keys and shortcuts + Header for the keys and shortcuts remapping section + + + Text + Header for the text mapping section + + + Programs + Header for the programs section + + + Urls + Header for the URLs section + + + + + maps to + Text showing key mapping relationship + + + inserts + Text showing text insertion action + + + opens + Text showing opening action for programs and URLs + + + in + Text showing app-specific context + + + + + Delete + Menu item to delete a mapping + + + + + Arguments: + Label for program arguments in tooltip + + + Start in: + Label for start directory in tooltip + + + Elevation: + Label for elevation level in tooltip + + + If running: + Label for if running action in tooltip + + + Window: + Label for window visibility in tooltip + + + + + Add new remapping + Default title for remapping dialog (changed dynamically to "Edit remapping" in code) + + + Save + Primary button text for remapping dialog + + + Cancel + Close button text for remapping dialog + + + + + Are you sure? + Title for delete confirmation dialog + + + You are about to delete this remapping. + Content for delete confirmation dialog + + + Delete + Primary button text for delete confirmation dialog + + + Cancel + Close button text for delete confirmation dialog + \ No newline at end of file