From b74c5bf6ff8415de49c0f8061f431bff695b93f8 Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Thu, 28 Nov 2024 17:36:59 +0000 Subject: [PATCH] Use xtermjs onData rather than onKey --- demo/serve/demo.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/serve/demo.ts b/demo/serve/demo.ts index 834e487..533bc33 100644 --- a/demo/serve/demo.ts +++ b/demo/serve/demo.ts @@ -44,7 +44,7 @@ export class Demo { async start(): Promise { 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(); @@ -55,8 +55,8 @@ export class Demo { resizeObserver.observe(this._options!.targetDiv); } - async onKey(arg: any): Promise { - await this._shell.input(arg.key); + async onData(data: string): Promise { + await this._shell.input(data); } async onResize(arg: any): Promise {