Escape button functionality in mac application

The ‘escape’ button functionality in macOS app exits fullscreen mode, i think it will be more usefull if it had the same functionality like when using the browser.

thanks!