#pragma once #include #include "KeyDropDownControl.h" class SingleKeyRemapControl { private: // Drop down to display the selected remap key KeyDropDownControl singleKeyRemapDropDown; // Button to type the remap key Button typeKey; // StackPanel to parent the above controls StackPanel singleKeyRemapControlLayout; public: // Handle to the current Edit Keyboard Window static HWND EditKeyboardWindowHandle; // Pointer to the keyboard manager state static KeyboardManagerState* keyboardManagerState; // Stores the current list of remappings static std::vector> singleKeyRemapBuffer; SingleKeyRemapControl(Grid table, const int colIndex) : singleKeyRemapDropDown(false) { typeKey.Content(winrt::box_value(L"Type Key")); typeKey.Width(KeyboardManagerConstants::RemapTableDropDownWidth); typeKey.Click([&](winrt::Windows::Foundation::IInspectable const& sender, RoutedEventArgs const&) { keyboardManagerState->SetUIState(KeyboardManagerUIState::DetectSingleKeyRemapWindowActivated, EditKeyboardWindowHandle); // Using the XamlRoot of the typeKey to get the root of the XAML host createDetectKeyWindow(sender, sender.as