Skip to content

Commit

Permalink
Use xtermjs onData rather than onKey
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthomas23 committed Nov 28, 2024
1 parent ee2d150 commit b74c5bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/serve/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class Demo {

async start(): Promise<void> {
this._term!.onResize(async (arg: any) => await this.onResize(arg));
this._term!.onKey(async (arg: any) => await this.onKey(arg));
this._term!.onData(async (data: string) => await this.onData(data));

const resizeObserver = new ResizeObserver(entries => {
this._fitAddon!.fit();
Expand All @@ -55,8 +55,8 @@ export class Demo {
resizeObserver.observe(this._options!.targetDiv);
}

async onKey(arg: any): Promise<void> {
await this._shell.input(arg.key);
async onData(data: string): Promise<void> {
await this._shell.input(data);
}

async onResize(arg: any): Promise<void> {
Expand Down

0 comments on commit b74c5bf

Please sign in to comment.