Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions web_netcat/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
letterSpacing: 0,
fontFamily: 'monospace',
});
term.attachCustomKeyEventHandler((e) => {
// Ctrl + Shift + C, to prevent browser from opening devtools
if (e.ctrlKey && e.shiftKey && e.keyCode == 67) {
e.preventDefault();
const success = document.execCommand('copy');
if (!success) {
console.error('Failed to copy to clipboard');
}
}
});
const fitAddon = new FitAddon.FitAddon();
term.loadAddon(fitAddon);
term.open(document.getElementById("terminal"));
Expand Down