RISOLTO!!
scrivo il codice, magari può servire a qualcuno
function getKeyCode(e){
var targ;
if (!e) var e = window.open;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) targ = targ.parentNode;
if (targ.tagName == 'BODY' || targ.tagName == 'body') {
window.location=(apri('xxx'),'open_window',
'menubar, toolbar, location, directories, status, scrollbars, resizable, dependent, width=640, height=480, left=0, top=0');
window.location='xxx';
}