From ca6ddbd641af06e5b3b5d5edc1996f08d697bf48 Mon Sep 17 00:00:00 2001 From: Krishna Srinivas Date: Sun, 10 May 2015 14:23:59 +0530 Subject: [PATCH] Merge PR #15 broke 'ctrl-c-copy'. Fixing this. Ctrl-C is for copy, Ctrl-Shift-V is for paste. --- public/wetty/hterm_all.js | 2 ++ public/wetty/wetty.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/public/wetty/hterm_all.js b/public/wetty/hterm_all.js index 662d33e..80a522d 100644 --- a/public/wetty/hterm_all.js +++ b/public/wetty/hterm_all.js @@ -6465,6 +6465,8 @@ hterm.Keyboard.KeyMap.prototype.onCtrlC_ = function(e, keyDef) { if (this.keyboard.terminal.clearSelectionAfterCopy) { setTimeout(selection.collapseToEnd.bind(selection), 50); } + if (this.keyboard.terminal.prefs_.get('enable-clipboard-notice')) + setTimeout(this.keyboard.terminal.showOverlay.bind(this.keyboard.terminal, hterm.notifyCopyMessage, 500), 200); return hterm.Keyboard.KeyActions.PASS; } diff --git a/public/wetty/wetty.js b/public/wetty/wetty.js index 03928bd..964d640 100644 --- a/public/wetty/wetty.js +++ b/public/wetty/wetty.js @@ -39,6 +39,9 @@ ws.onopen = function() { term.setCursorPosition(0, 0); term.setCursorVisible(true); + term.prefs_.set('ctrl-c-copy', true); + term.prefs_.set('use-default-window-copy', true); + term.runCommandClass(Wetty, document.location.hash.substr(1)); ws.send(JSON.stringify({ rowcol: true,