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,
which: 79
},
// F6 构建并运行
// F5 Build
build: {
ctrlKey: false,
altKey: false,
shiftKey: false,
which: 116
},
// F6 Build & Run
buildRun: {
ctrlKey: false,
altKey: false,
@ -416,7 +423,14 @@ var hotkeys = {
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();
event.preventDefault();

View File

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

View File

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