(function () {
    var nw      = require("nw.gui"),
        guiWin  = nw.Window.get();

    window.onkeydown = function (e) {
        if ((e.ctrlKey || e.metaKey) && e.keyCode === 87) {
            guiWin.hide();
            guiWin.emit("hide");
            e.preventDefault();
        }
    };
}());

(function () {
    var nw      = require("nw.gui"),
        guiWin  = nw.Window.get();

    var ma

    window.onkeydown = function (e) {
        if (e.keyCode === 27 || ((e.ctrlKey || e.metaKey) && e.keyCode === 87)) {
            // (Control | Command) + W
            guiWin.hide();
            guiWin.emit("hide");
            e.preventDefault();
        }

        if (e.keyCode === 13) {
            // Enter
            guiWin.maximize();
        }
    };
}());

Add window maximize shortcut key (Return key) in External window.
Add window maximize shortcut key (Return key) in External window.
