Browse Source

Merge PR #15 broke 'ctrl-c-copy'. Fixing this.

Ctrl-C is for copy, Ctrl-Shift-V is for paste.
pull/31/head
Krishna Srinivas 10 years ago
parent
commit
ca6ddbd641
  1. 2
      public/wetty/hterm_all.js
  2. 3
      public/wetty/wetty.js

2
public/wetty/hterm_all.js

@ -6465,6 +6465,8 @@ hterm.Keyboard.KeyMap.prototype.onCtrlC_ = function(e, keyDef) {
if (this.keyboard.terminal.clearSelectionAfterCopy) { if (this.keyboard.terminal.clearSelectionAfterCopy) {
setTimeout(selection.collapseToEnd.bind(selection), 50); 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; return hterm.Keyboard.KeyActions.PASS;
} }

3
public/wetty/wetty.js

@ -39,6 +39,9 @@ ws.onopen = function() {
term.setCursorPosition(0, 0); term.setCursorPosition(0, 0);
term.setCursorVisible(true); 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)); term.runCommandClass(Wetty, document.location.hash.substr(1));
ws.send(JSON.stringify({ ws.send(JSON.stringify({
rowcol: true, rowcol: true,

Loading…
Cancel
Save