JS > Prevent custom defined keyboard shortcuts while typing
<p>I want to define <code>&lt;Shift&gt; + ?</code> shortcut to open specific help modal in each page (I mean each page has different content). Just like Gmail.<br>
There are hundreds of ways to implement that, but my question is how to prevent opening modal (triggering event) while user is typing in input or ... !<br>
The project is so big and i cannot go back and write event for all inputs, textareas or ... to prevent my shortcut on focusing them and reactivate it on element blur.<br>
So i need dynamic idea! No matter its Javascript, jQuery or Angular!<br>
For downvoter guys that want to see dummy duplicate codes:  </p>

<pre><code>$document.bind("keypress", function(e) {
    if (e.shiftKey &amp;&amp; e.keyCode == 191) {...}
});
</code></pre>