Skip to content

What is the proper #include for the InputKeyboardSourceEventArgs ? #10096

Answered by DarranRowe
shelllet asked this question in Q&A
Discussion options

You must be logged in to vote

Well, the most important thing to note here is that the sample is wrong in regards to the InputKeyboardSourceEventArgs type.

The documentation for the KeyDown event shows that what it has is a Microsoft.UI.Input.KeyEventArgs parameter. This is also reflected in the C++/WinRT headers.

int32_t __stdcall add_KeyDown(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().KeyDown(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Input::InputKeyboardSource, winrt::Microsoft::U…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by shelllet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants