I think you could add this listener on `window` instead.