Tweaks to global event monitor for keyboard shortcuts. Lose application focus when closing dialogue.