Simplify KeyboardShortcutManager and correctly support Alt-Gr key (#1223)

* Simplify KeyboardShortcutManager and correctly support Alt-Gr key

* replace multimap with map
move all global fields-functions to the class

* feedback

Co-authored-by: Eric Wong <eriwong@microsoft.com>
This commit is contained in:
Rudy Huyn
2020-09-15 12:43:50 -07:00
committed by GitHub
parent 6d059aa126
commit bc473617ae
4 changed files with 200 additions and 415 deletions

View File

@@ -436,16 +436,14 @@ void MainPage::OnAboutFlyoutOpened(_In_ Object ^ sender, _In_ Object ^ e)
{
// Keep Ignoring Escape till the About page flyout is opened
KeyboardShortcutManager::IgnoreEscape(false);
KeyboardShortcutManager::UpdateDropDownState(this->AboutPageFlyout);
KeyboardShortcutManager::HonorShortcuts(false);
}
void MainPage::OnAboutFlyoutClosed(_In_ Object ^ sender, _In_ Object ^ e)
{
// Start Honoring Escape once the About page flyout is closed
KeyboardShortcutManager::HonorEscape();
KeyboardShortcutManager::UpdateDropDownState(nullptr);
KeyboardShortcutManager::HonorShortcuts(!NavView->IsPaneOpen);
}
void MainPage::OnNavSelectionChanged(_In_ Object ^ sender, _In_ MUXC::NavigationViewSelectionChangedEventArgs ^ e)