Copy selected terminal text with ctrl shift c
This commit is contained in:
@@ -280,7 +280,7 @@ angular.module('Application').controller('TerminalController', ['$scope', '$tran
|
||||
$scope.terminal.focus();
|
||||
};
|
||||
|
||||
$scope.terminalCopy = function () {
|
||||
$scope.terminalCopyToClipboard = function () {
|
||||
if (!$scope.terminal) return;
|
||||
|
||||
// execCommand('copy') would copy any selection from the page, so do this only if terminal has a selection
|
||||
@@ -363,6 +363,13 @@ angular.module('Application').controller('TerminalController', ['$scope', '$tran
|
||||
});
|
||||
});
|
||||
|
||||
window.addEventListener('keydown', function (event) {
|
||||
if (event.key === 'C' && event.ctrlKey) { // ctrl shift c
|
||||
event.preventDefault();
|
||||
$scope.terminalCopyToClipboard();
|
||||
}
|
||||
});
|
||||
|
||||
$translate([ 'terminal.title' ]).then(function (tr) {
|
||||
if (tr['terminal.title'] !== 'terminal.title') window.document.title = tr['terminal.title'];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user