Window keydown event

I have a foreground mainWindow with a KeyDown event. The users hits a key, the code activates a pagepanel with a certain value and when procedure is finished the user returns to the mainWindow. Unfortunately, the KeyDown event doesn’t fire anymore. I can’t figure out why? It is still the same mainWindow on the foreground.

Any suggestions?

The focus is probably on some control, so Window.KeyDown will not be called.

Yes indeed, I just found that out… mmm thanks.