Well if check box from the dialog is not set, then there is no any connnection of key and dialog.
The key event comes into the picture only if the check box is already set.
If the check box is already set, then normal procedure is not to show the dialog and procede further.
But if check box is set, and user want to see the dialog, he can see by pressing a particular key.
a) if check box is not already set, dialog will always appear
b) if check box is set, dialog will not appear
c) if check box is set, and user still want to see dialog, he can get it by pressing a particular key.
So i am checking whether key is set or not as a condition before displaying dialog. But key event is fired after control comes to this key check condition.
So i was looking for new thread.