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