No, you did not create an event. The event is this:
https://msdn.microsoft.com/en-us/library/system.windows.uielement.keydown%28v=vs.110%29.aspx[
^].
And you, at best, created the event handler and added it to the invocation list of the event instance of some
UIElement
,
Window
in your case; and this is what you really need to handle the event. The code sample for the event handler is shown on the MSDN page referenced above.
With this event, you need to use the property
KeyEventArgs.Key
of the event arguments instance passed to your handler, as shown in the same code sample. And the keys to use are here:
https://msdn.microsoft.com/en-us/library/system.windows.input.key%28v=vs.110%29.aspx[
^].
—SA