Keyboard detection

Hi mates!

Is there a way to detect that status of the virtual keyboard?

I use a variable to control the status of the keyboard, but if I close the keyboard with the keyboard button then it does not trigger an event and I can not update my status variable.

Any ideas? Thanks in advanced! =)