Update web-console-full-window.component.ts

This commit is contained in:
piotrpekala7 2020-04-15 17:18:34 +02:00
parent 71c1798152
commit 0e4ea77d3f

View File

@ -61,6 +61,15 @@ export class WebConsoleFullWindowComponent implements OnInit, AfterViewInit {
this.fitAddon.fit();
this.term.focus();
this.term.attachCustomKeyEventHandler((key: KeyboardEvent) => {
if (key.code === 'KeyC' || key.code === 'KeyV'){
if (key.ctrlKey) {
return false;
}
}
return true;
});
let numberOfColumns = Math.round(window.innerWidth / this.consoleService.getLineWidth());
let numberOfRows = Math.round(window.innerHeight / this.consoleService.getLineHeight());
this.term.resize(numberOfColumns, numberOfRows);