How to prevent keyboard shortcuts when a dialog is open?

Printable View