1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-14 18:27:25 +08:00

Add copy shortcuts

This commit is contained in:
Marcos Lilljedahl 2016-12-24 13:52:15 -03:00
parent 92aa3aa3f8
commit 93740dc9f5

View File

@ -226,6 +226,14 @@
cursorBlink: false cursorBlink: false
}); });
term.attachCustomKeydownHandler(function (e) {
// Ctrl + Alt + C
if (e.ctrlKey && e.altKey && (e.keyCode == 67)) {
document.execCommand('copy');
return false;
}
});
term.open(terminalContainer); term.open(terminalContainer);
// Set geometry during the next tick, to avoid race conditions. // Set geometry during the next tick, to avoid race conditions.