diff --git a/dashboard/src/js/terminal.js b/dashboard/src/js/terminal.js index f536c72fa..bf741afc6 100644 --- a/dashboard/src/js/terminal.js +++ b/dashboard/src/js/terminal.js @@ -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']; }); diff --git a/dashboard/src/terminal.html b/dashboard/src/terminal.html index 07eb4dff7..81730fc73 100644 --- a/dashboard/src/terminal.html +++ b/dashboard/src/terminal.html @@ -159,7 +159,7 @@