KeyPressed WebDialog

I must create a class that has WebControlWrapper as superClass and this class is in a WebDialog.
I must get the value of the KeyPressed Event for executing some Javascript, but the KeyPressedEvent doesn’t work in the WebDialog, there is any way to fix this?

Please refrain from posting multiple times with the same question. It is confusing.

I tried to find a way for you in your previous post :

the post is similar, but not the same.
In this post, the problem is that the keyPressed event is not fired when I press a Keyboard key in a WebDialog.

If I put this code:

in the keyPressed Event of a web page, it works well, but if I put the same code in the KeyPressed event of a webDialog, it doesn’t work.