My question comes directly from the fact that the popular RetroArch emulator uses Escape key to quit the whole application and, moreover, it's apparently a big source of drama for some.
It personally perplexes me as barring some really obscure examples every game and app I used did not close itself when you press escape (with the notable exception of Game Maker games which have/had it by default and it has to be manually disabled). I actually thought it's common knowledge and an established UX pattern for escape to only pause whatever you're currently doing (and instant quit being reserved to alt+f4) but looking around I don't think I can find anything on that.
So, is immediately closing an application when the user presses escape good, bad or neutral UX? I am specifically asking about desktop applications, not web apps (unless they are run in a context of a self-contained desktop application like NW.js, which makes them not really a web application anymore)