Unverified Commit bd75ad5a authored by MiaoWoo's avatar MiaoWoo Committed by GitHub

feat: add ctrl +c and ctrl + v support

添加快捷键复制黏贴功能
parent c6b443be
......@@ -51,6 +51,15 @@ export class ElementSshTermComponent implements OnInit, AfterViewInit, OnDestroy
}
});
this.view.Term = this.term;
this.term.attachCustomKeyEventHandler(e => {
if (e.ctrlKey && e.key == 'c' && term.hasSelection()) {
return false;
}
if (e.ctrlKey && e.key == 'v') {
return false;
}
return true;
})
}
changeWinSize(size: Array<number>) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment