In ExtJs 3, the behavior of closing window upon Esc was per default. In ExtJS 4, it is not. I found out the Ext.util.KeyNav, but it seems to work only under IE.

To reproduce the case, just add the listeners to the example examples/window/layout.html

Code:
                listeners: {
                  show : function(win) {
                    Ext.create('Ext.util.KeyNav', win.getEl(), {
                      "esc" : function(e){
                        win.hide();
                      },
                      scope: win
                    });
                  }
                }
It works only under IE.