0

Is there a way to fire a custom KeyUp/KeyDown event on the CoreWindow?

For example, take the following event:http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.core.corewindow.keyup.aspx.

My application already uses CoreWindow::KeyUp and CoreWindow::KeyDown to handle events. I am trying to test that the correct delegates are being attached and thus called when an event happens.

Note that I can't call the delegate function directly since it will not test the fact that the delegate is attached to the event.

I am looking for an answer similar to https://stackoverflow.com/a/3977396/756356.

Community
  • 1
  • 1
Arindam
  • 342
  • 1
  • 12

1 Answers1

0

I doubt that's possible because it sounds like something possibly interfering with the sandbox concept of modern apps. You could maybe insert some layer between the CoreWindow and your handlers and bubble the events through that layer to make is possible to raise your proxy events. I would recommend against that though since that just adds code you don't need.

Filip Skakun
  • 31,624
  • 6
  • 74
  • 100