I am using the editArea library and jquery to do what i need...
http://www.cdolivet.com/index.php?page=editArea&sess=2b8243f679e0d472397bfa959e1d3841
so
You should be doing
iframeDoc = document.getElementById('resultsFrame').contentWindow; // result frame is id of iframe $(iframeDoc).keydown(function(e)) { // your functionality here }