From c6d605ea39c1ce996e052694e2c95c51632b09e5 Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Mon, 27 Nov 2023 14:15:17 +0000 Subject: [PATCH] [KBM]Change UI strings to mention remap to text (#30039) * [KBM]Change UI strings to mention remap to text * Update src/modules/keyboardmanager/KeyboardManagerEditor/Resources.resx Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> * Update src/modules/keyboardmanager/KeyboardManagerEditor/Resources.resx Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> --------- Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> --- .../KeyboardManagerEditor/Resources.resx | 11 ++++------- .../KeyboardManagerEditorStrings.h | 9 ++------- .../KeyboardManagerEditorLibrary/ShortcutControl.cpp | 2 +- .../SingleKeyRemapControl.cpp | 2 +- .../Settings.UI/Strings/en-us/Resources.resw | 4 ++-- 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/modules/keyboardmanager/KeyboardManagerEditor/Resources.resx b/src/modules/keyboardmanager/KeyboardManagerEditor/Resources.resx index 2ddc68f7a6..1e342b4414 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditor/Resources.resx +++ b/src/modules/keyboardmanager/KeyboardManagerEditor/Resources.resx @@ -177,14 +177,14 @@ Some of the shortcuts could not be remapped. Continue anyway? - Select the key you want to change ("Select") and then the key or shortcut you want it to send ("To send"). + Select the key you want to change ("Select") and then configure the key, shortcut or text you want it to send ("To send"). Example of a remapping: Select A and send "Ctrl+C", "A" would be your "Select" and "Ctrl+C" would be your "To send" command. Key on a keyboard - Select the shortcut you want to change ("Select") and then the key or shortcut you want it to invoke ("To send"). + Select the shortcut you want to change ("Select") and then configure the key, shortcut or text you want it to send ("To send"). Key on a keyboard @@ -290,11 +290,8 @@ Text - - Shortcut - - - Key + + Key/Shortcut Key on a keyboard diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/KeyboardManagerEditorStrings.h b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/KeyboardManagerEditorStrings.h index f41002b4be..360e9fe0bc 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/KeyboardManagerEditorStrings.h +++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/KeyboardManagerEditorStrings.h @@ -17,14 +17,9 @@ namespace KeyboardManagerEditorStrings return GET_RESOURCE_STRING(IDS_MAPPING_TYPE_DROPDOWN_TEXT); } - inline std::wstring MappingTypeShortcut() + inline std::wstring MappingTypeKeyShortcut() { - return GET_RESOURCE_STRING(IDS_MAPPING_TYPE_DROPDOWN_SHORTCUT); - } - - inline std::wstring MappingTypeKey() - { - return GET_RESOURCE_STRING(IDS_MAPPING_TYPE_DROPDOWN_KEY); + return GET_RESOURCE_STRING(IDS_MAPPING_TYPE_DROPDOWN_KEY_SHORTCUT); } // Function to return the error message diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/ShortcutControl.cpp b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/ShortcutControl.cpp index 8de7350979..4091c4e4d2 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/ShortcutControl.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/ShortcutControl.cpp @@ -124,7 +124,7 @@ void ShortcutControl::AddNewShortcutControlRow(StackPanel& parent, std::vectorshortcutControlLayout.as(); auto firstLineStackPanel = keyboardRemapControlObjects.back()[1]->keyComboAndSelectStackPanel.as(); diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/SingleKeyRemapControl.cpp b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/SingleKeyRemapControl.cpp index 4680ef7506..c1c92d0d69 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/SingleKeyRemapControl.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/SingleKeyRemapControl.cpp @@ -77,7 +77,7 @@ SingleKeyRemapControl::SingleKeyRemapControl(StackPanel table, StackPanel row, c auto typeCombo = ComboBox(); typeCombo.Width(EditorConstants::RemapTableDropDownWidth); - typeCombo.Items().Append(winrt::box_value(KeyboardManagerEditorStrings::MappingTypeKey())); + typeCombo.Items().Append(winrt::box_value(KeyboardManagerEditorStrings::MappingTypeKeyShortcut())); typeCombo.Items().Append(winrt::box_value(KeyboardManagerEditorStrings::MappingTypeText())); keyComboAndSelectStackPanel.Children().Append(typeCombo); keyComboAndSelectStackPanel.Children().Append(typeKey.as