[Kbm] Save the remaps to file[part-1] (#2184)

* Added Inital FileWatcher Implementation

* Added logic to read remap from file

* Added remap logic save to file

* Refactor code

* Moved the strings to constant file

* Added logic to handle Win key

* Updated filewatcher logic to avoid duplicate events

* Added comments

* Fix spacing

* Fix spacing

* Update logic to accomodate upstream merge

* Added global property name for os level shortcuts

* Added subkey for inprocess keys

* Remove non required file

* Added Changes required after merge

* Fix spacing in Helper.cpp
This commit is contained in:
udit3333
2020-04-20 08:22:36 -07:00
committed by GitHub
parent cae77ae291
commit 325db535c0
29 changed files with 647 additions and 152 deletions

View File

@@ -14,7 +14,7 @@ void KeyDropDownControl::SetDefaultProperties(bool isShortcut)
keyCodeList = keyboardManagerState->keyboardMap.GetKeyCodeList(isShortcut);
dropDown.ItemsSource(keyboardManagerState->keyboardMap.GetKeyNameList(isShortcut));
// drop down open handler - to reload the items with the latest layout
dropDown.DropDownOpened([&, isShortcut](IInspectable const& sender, auto args) {
dropDown.DropDownOpened([&, isShortcut](winrt::Windows::Foundation::IInspectable const& sender, auto args) {
ComboBox currentDropDown = sender.as<ComboBox>();
CheckAndUpdateKeyboardLayout(currentDropDown, isShortcut);
});
@@ -93,7 +93,7 @@ bool KeyDropDownControl::CheckRepeatedModifier(StackPanel parent, uint32_t dropD
if (i != dropDownIndex)
{
// If the key type for the newly added key matches any of the existing keys in the shortcut
if (GetKeyType(keyCodeList[selectedKeyIndex]) == GetKeyType(currentKeys[i]))
if (KeyboardManagerHelper::GetKeyType(keyCodeList[selectedKeyIndex]) == KeyboardManagerHelper::GetKeyType(currentKeys[i]))
{
matchPreviousModifier = true;
break;