Skip to content

Commit

Permalink
Merge pull request #29 from SquitchYT/dev-bugs-fix
Browse files Browse the repository at this point in the history
Dev bugs fix
  • Loading branch information
SquitchYT authored Jun 15, 2023
2 parents ab63f48 + eb00085 commit 711f53a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/style/term.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
.internal-term {
height: calc(100% - 30px);
width: 100%;

canvas {
will-change: transform;
}
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/ts/class/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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");
})
}

Expand Down

0 comments on commit 711f53a

Please sign in to comment.