document.body.addEventListener('keydown', function(e) { if (e.target.tagName !== 'INPUT') doKeyBindings(); }, false);