F5 - Build

This commit is contained in:
Liang Ding 2014-11-19 09:39:06 +08:00
parent d27dfaa621
commit fc8aa0e2a3
3 changed files with 19 additions and 4 deletions

View File

@ -86,7 +86,14 @@ var hotkeys = {
shiftKey: true, shiftKey: true,
which: 79 which: 79
}, },
// F6 构建并运行 // F5 Build
build: {
ctrlKey: false,
altKey: false,
shiftKey: false,
which: 116
},
// F6 Build & Run
buildRun: { buildRun: {
ctrlKey: false, ctrlKey: false,
altKey: false, altKey: false,
@ -416,7 +423,14 @@ var hotkeys = {
return false; return false;
} }
if (event.which === hotKeys.buildRun.which) { // F6 构建并运行 if (event.which === hotKeys.build.which) { // F5 Build
menu.build();
event.preventDefault();
return;
}
if (event.which === hotKeys.buildRun.which) { // F6 Build & Run
menu.run(); menu.run();
event.preventDefault(); event.preventDefault();

View File

@ -216,7 +216,7 @@ var menu = {
} }
}); });
}, },
// 构建并运行. // Build & Run.
run: function () { run: function () {
menu.saveAllFiles(); menu.saveAllFiles();
@ -253,7 +253,7 @@ var menu = {
} }
}); });
}, },
// 构建 // Build.
build: function () { build: function () {
menu.saveAllFiles(); menu.saveAllFiles();

View File

@ -47,6 +47,7 @@
</ul> </ul>
<h2>{{.i18n.run}}</h2> <h2>{{.i18n.run}}</h2>
<ul> <ul>
<li>F5{{.i18n.colon}}{{.i18n.build}}</li>
<li>F6{{.i18n.colon}}{{.i18n.build_n_run}}</li> <li>F6{{.i18n.colon}}{{.i18n.build_n_run}}</li>
</ul> </ul>
</body> </body>