/usr/share/novnc-pve/app.js
clipboardPasteFrom(text) {
if (this._rfb_connection_state !== 'connected' || this._viewOnly) {
console.log("noconnect");
return; }
$$$core$rfb$$RFB.messages.clientCutText(this._sock, text);
for (let lt of text) {
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(lt) !== -1
var shift = $$$core$input$keysym$$default.XK_Shift_L; // To help with minification
if (needs_shift) {
this.sendKey(shift,"XK_Shift_L", true);
}
this.sendKey(lt.charCodeAt(),lt, true);
this.sendKey(lt.charCodeAt(),lt, false);
if (needs_shift) {
this.sendKey(shift,"XK_Shift_L", false);
}
}
document.getElementById('noVNC_clipboard_text').value = "";
}
// show/hide the buttons
document.getElementById('noVNC_disconnect_button')
.classList.add('noVNC_hidden');
if (me.consoletype === 'kvm') {
document.getElementById('noVNC_clipboard_button')
//.classList.add('noVNC_hidden'); //comment this
}
if (me.consoletype === 'shell' || me.consoletype === 'upgrade') {
document.getElementById('pve_commands_button')
// .classList.add('noVNC_hidden'); //comment this
}
/usr/share/novnc-pve/index.html.tpl
Clipboard