Adding method to block keyboard shortcuts while modal dialogs are active
Checking for whether the bindings exist before calling them.
Skipping key bindings when input elements are active.