diff --git a/src/style/term.scss b/src/style/term.scss index c5adc2f..ea087a2 100644 --- a/src/style/term.scss +++ b/src/style/term.scss @@ -22,6 +22,10 @@ .internal-term { height: calc(100% - 30px); width: 100%; + + canvas { + will-change: transform; + } } } } diff --git a/src/ts/class/terminal.ts b/src/ts/class/terminal.ts index cc8993f..b9a86cb 100644 --- a/src/ts/class/terminal.ts +++ b/src/ts/class/terminal.ts @@ -41,6 +41,17 @@ export class Terminal { console.error(error); }); }) + + + this.term.attachCustomKeyEventHandler((e) => { + if (e.key == "F10") { + invoke("terminal_input", {content: "\x1b[21~", id: id}); + + return false + } else { + return true + } + }) } async launch(target: HTMLElement, command: string) { @@ -54,6 +65,7 @@ export class Terminal { this.term.onRender(() => { this.fitAddon.fit(); invoke("resize_terminal", {cols: this.term.cols, rows: this.term.rows, id: this.id}); + this.term.write("\0"); }) }