clear output

This commit is contained in:
Liang Ding 2015-01-12 13:56:00 +08:00
parent a3a3ed0577
commit 9fb70afb16
2 changed files with 9 additions and 8 deletions

View File

@ -99,10 +99,10 @@ var hotkeys = {
$(".bottom-window-group .notification").focus();
}
},
// Ctrl-C
// Alt-C
clearWindow: {
ctrlKey: true,
altKey: false,
ctrlKey: false,
altKey: true,
shiftKey: false,
which: 67
},
@ -212,12 +212,13 @@ var hotkeys = {
},
_bindOutput: function () {
$(".bottom-window-group .output").keydown(function (event) {
event.preventDefault();
var hotKeys = hotkeys.defaultKeyMap;
if (event.ctrlKey === hotKeys.clearWindow.ctrlKey
&& event.which === hotKeys.clearWindow.which) { // Ctrl-C clear output
if (event.altKey === hotKeys.clearWindow.altKey
&& event.which === hotKeys.clearWindow.which) { // Alt-C clear output
bottomGroup.clear('output');
event.preventDefault();
return;
}
});

View File

@ -54,7 +54,7 @@
<ul>
<li>F5{{.i18n.colon}}{{.i18n.build}}</li>
<li>F6{{.i18n.colon}}{{.i18n.build_n_run}}</li>
<li>Ctrl-C{{.i18n.colon}}{{.i18n.clearOutput}}</li>
<li>Alt-C{{.i18n.colon}}{{.i18n.clearOutput}}</li>
</ul>
<h2>{{.i18n.file_tree}}</h2>
<ul>