#pragma once #include #include #include class ShortcutControl { private: // Textblock to display the selected shortcut TextBlock shortcutText; // Button to type the shortcut Button typeShortcut; // StackPanel to parent the above controls StackPanel shortcutControlLayout; public: // Handle to the current Edit Shortcuts Window static HWND EditShortcutsWindowHandle; // Pointer to the keyboard manager state static KeyboardManagerState* keyboardManagerState; // Stores the current list of remappings static std::vector> shortcutRemapBuffer; ShortcutControl(const int& rowIndex, const int& colIndex) { typeShortcut.Content(winrt::box_value(winrt::to_hstring("Type Shortcut"))); typeShortcut.Click([&, rowIndex, colIndex](IInspectable const& sender, RoutedEventArgs const&) { keyboardManagerState->SetUIState(KeyboardManagerUIState::DetectShortcutWindowActivated, EditShortcutsWindowHandle); // Using the XamlRoot of the typeShortcut to get the root of the XAML host createDetectShortcutWindow(sender, sender.as