[Keyboard Manager] Added in Shortcut to Key and Key to Shortcut remapping (#5070)

* Added union class

* Added key to shortcut backend implementation

* Added tests

* Added tests for CapsLock/modifier workaround for key to shortcut

* Added correct JSON loading step

* Cleaned shortcut remap code to use helper function for modifier keys

* Removed RemapKey class

* Enable Key to Shortcut in UI along with Type Shortcut in Remap key window

* Fixed orphaning and unsuccessful remap dialog

* Fixed column width

* Renamed second type key button

* Fixed Type Shortcut issues

* Fixed shortcut to key backend logic and manually tested most scenarios

* Added s2k in UI, manually verified its working

* Added one more k2s test

* Added tests for s2k

* Added tests for Caps Lock workaround in shortcut remaps

* Fixed formatting

* Fixed formatting

* Removed safety code since it can cause issues with code generated key up events

* Added test for key up scenario

* Tweaked warning text

* Tweaked text

* Tweaked text to fit in two lines

* telemetry additions
This commit is contained in:
Arjun Balgovind
2020-07-23 16:43:49 -07:00
committed by GitHub
parent 53c4c6cbb8
commit ff1e04b957
32 changed files with 2322 additions and 686 deletions

View File

@@ -231,7 +231,7 @@
<CustomControls:GroupTitleTextBlock x:Uid="KeyboardManager_RemapKeyboardHeader"
IsActive="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/>
<CustomControls:BodyTextBlock Text="Click below to remap a single key to another key"
<CustomControls:BodyTextBlock Text="Click below to remap keys to other keys or shortcuts."
IsActive="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"
Margin="{StaticResource SmallTopMargin}"/>
@@ -270,7 +270,7 @@
<CustomControls:GroupTitleTextBlock x:Uid="KeyboardManager_RemapShortcutsHeader"
IsActive="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/>
<CustomControls:BodyTextBlock Text="Click below to remap a shortcut (hotkey) to another shortcut"
<CustomControls:BodyTextBlock Text="Click below to remap a shortcuts to other shortcuts or keys. Additionally, mappings can be targeted to specific applications as well."
IsActive="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/>
<Button x:Uid="KeyboardManager_RemapShortcutsButton"