Contains the arguments returned by a virtual key event.
public ref class KeyEventArgs sealed : ICoreWindowEventArgs
This object is returned by a delegate registered for one of the following events:
C++
// returning keypress events data through KeyEventArgs
void MyCoreWindowEvents::SetWindow( // implementation called by CoreApplication::Run(), provided for context
_In_ CoreWindow^ window
)
{
// ...
window->KeyDown +=
ref new TypedEventHandler<CoreWindow^, KeyEventArgs^>(this, &CoreWindowEvents::OnKeyDown);
window->KeyUp +=
ref new TypedEventHandler<CoreWindow^, KeyEventArgs^>(this, &CoreWindowEvents::OnKeyUp);
// ...
}
Note
This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX).
Namespace: Windows.UI.Core
Metadata: windows.winmd