From 93740dc9f59c9af7c25871afb56a5c83e3f8cce3 Mon Sep 17 00:00:00 2001 From: Marcos Lilljedahl Date: Sat, 24 Dec 2016 13:52:15 -0300 Subject: [PATCH] Add copy shortcuts --- www/assets/app.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/assets/app.js b/www/assets/app.js index a75872f..13e4fc2 100644 --- a/www/assets/app.js +++ b/www/assets/app.js @@ -226,6 +226,14 @@ 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); // Set geometry during the next tick, to avoid race conditions.