mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-23 10:40:16 +00:00
Update web-console.component.ts
This commit is contained in:
parent
1199dedc23
commit
71c1798152
@ -21,6 +21,7 @@ export class WebConsoleComponent implements OnInit, AfterViewInit {
|
|||||||
|
|
||||||
public term: Terminal = new Terminal();
|
public term: Terminal = new Terminal();
|
||||||
public fitAddon: FitAddon = new FitAddon();
|
public fitAddon: FitAddon = new FitAddon();
|
||||||
|
private copiedText: string = '';
|
||||||
|
|
||||||
@ViewChild('terminal', {static: false}) terminal: ElementRef;
|
@ViewChild('terminal', {static: false}) terminal: ElementRef;
|
||||||
|
|
||||||
@ -51,6 +52,15 @@ export class WebConsoleComponent implements OnInit, AfterViewInit {
|
|||||||
this.term.loadAddon(this.fitAddon);
|
this.term.loadAddon(this.fitAddon);
|
||||||
this.fitAddon.activate(this.term);
|
this.fitAddon.activate(this.term);
|
||||||
this.term.focus();
|
this.term.focus();
|
||||||
|
|
||||||
|
this.term.attachCustomKeyEventHandler((key: KeyboardEvent) => {
|
||||||
|
if (key.code === 'KeyC' || key.code === 'KeyV'){
|
||||||
|
if (key.ctrlKey) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getUrl() {
|
getUrl() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user