You don't. You register a key press event listener on the main page and when the user types into the iframe, you can catch the strokes.
Example: http://www.jayssite.com/misc/iframesample.html (not my site, I googled it)
Example: http://www.jayssite.com/misc/iframesample.html (not my site, I googled it)