rem: function doClick(e) { var targ; if (!e) var e = window.event; if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement; if (targ.nodeType == 3) targ = targ.parentNode;   if ( ( ! e.metaKey && ! e.altKey &&  ! e.ctrlKey ) && ( (targ == document.body) || (targ ==  document.getElementsByTagName('html')[0]) ) ){ var code = String.fromCharCode(e.keyCode); var binding = getKeyBinding(code); if (binding) { if (binding["action"] == "goto") { document.location = (binding["data"]); } else if (binding["action"] == "focus") { var elements = document.getElementsByName(binding["data"]); elements[0].focus(); } else if (binding["action"] == "click") { var elements = document.getElementsByName(binding["data"]); elements[0].click(); }  }  } } 
add: doClick: function(e) { if (e.target.nodeType == 3) e.target = e.target.parentNode;   if (    ( !e.metaKey && !e.altKey && !e.ctrlKey ) && (    (e.target == document.body) || (e.target == document.getElementsByTagName("html")[0]) )) { var code    = String.fromCharCode(e.keyCode); var binding = Jifty.KeyBindings.get(code);  if (binding) { e.preventDefault();  if (binding["action"] == "goto") { document.location = (binding["data"]); } else if (binding["action"] == "focus") { var elements = document.getElementsByName(binding["data"]); elements[0].focus(); } else if (binding["action"] == "click") { var elements = document.getElementsByName(binding["data"]); elements[0].click(); } } } }, 
context: function doClick(e) {    var targ;        if (!e) var e = window.event;            if (e.target) targ = e.target;            else if (e.srcElement) targ = e.srcElement;        if (targ.nodeType == 3) // defeat Safari bug                targ = targ.parentNode;      // safari or mozilla   if ( ( ! e.metaKey && ! e.altKey &&  ! e.ctrlKey )        && (        (targ == document.body) ||        (targ ==  document.getElementsByTagName('html')[0])          ) ){	var code = String.fromCharCode(e.keyCode);    var binding = getKeyBinding(code);   if (binding) {   if (binding["action"] == "goto") {        document.location = (binding["data"]);    }    else if (binding["action"] == "focus") {      var elements = document.getElementsByName(binding["data"]);       elements[0].focus();    }   else if (binding["action"] == "click") {      var elements = document.getElementsByName(binding["data"]);       elements[0].click();    } }     }}
meta: 5054	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5054/5fc770d00dfa14df72eccfc2e5d3e37134868787/key_bindings.js/clean/share/web/static/js/key_bindings.js