Issue 39: clipboard not integrated with client operating system.
o From the author: Here is a simple patch that prompts the user to enter the text he'd like to paste. It is not integrated to the OS clipboard because to be honnest I've never seen any such hack work reliably among browsers, but at least it's a quick way to transfer text. It adds a menu entry in the context menu "Paste from browser"
This commit is contained in:
parent
91bb3f76cf
commit
b74ddd066b
1 changed files with 9 additions and 1 deletions
|
@ -2321,6 +2321,13 @@ VT100.prototype.pasteFnc = function() {
|
|||
}
|
||||
};
|
||||
|
||||
VT100.prototype.pasteBrowserFnc = function() {
|
||||
var clipboard = prompt("Paste into this box:","");
|
||||
if (clipboard != undefined) {
|
||||
return this.keysPressed('' + clipboard);
|
||||
}
|
||||
};
|
||||
|
||||
VT100.prototype.toggleUTF = function() {
|
||||
this.utfEnabled = !this.utfEnabled;
|
||||
|
||||
|
@ -2426,6 +2433,7 @@ VT100.prototype.showContextMenu = function(x, y) {
|
|||
'<ul id="menuentries">' +
|
||||
'<li id="beginclipboard">Copy</li>' +
|
||||
'<li id="endclipboard">Paste</li>' +
|
||||
'<li id="browserclipboard">Paste from browser</li>' +
|
||||
'<hr />' +
|
||||
'<li id="reset">Reset</li>' +
|
||||
'<hr />' +
|
||||
|
@ -2467,7 +2475,7 @@ VT100.prototype.showContextMenu = function(x, y) {
|
|||
}
|
||||
|
||||
// Actions for default items
|
||||
var actions = [ this.copyLast, p, this.reset,
|
||||
var actions = [ this.copyLast, p, this.pasteBrowserFnc, this.reset,
|
||||
this.toggleUTF, this.toggleBell,
|
||||
this.toggleSoftKeyboard,
|
||||
this.toggleCursorBlinking ];
|
||||
|
|
Loading…
Reference in a new issue