I have created one Lightning Component, and loading that from one Visualforce page. When I click on a button in Lightning Component, I am showing another Visualforce page as a Modal (popup) by using an Iframe. We can close that Modal by using an 'X' icon, which is calling the "CloseModal" method. That is fine.
Now, I aim to close the popup by using the Esc keyword. So, when I press Esc on the Visualforce page, it should call the "CloseModal" method.
I can communicate to the Lightning component from the VF page (from where I am loading the component) through "aura: method". But, I am unable to call the "CloseMethod" from VF Page, which has embedded in an iframe (Modal).
How can I achieve this?
Any thoughts would be appreciated!
Thanks Sannith