Handle timeout issue when pressing a hotkey