From 8d1771ef646a27c764b3edb7d9d72dcd100359b2 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri, 2 Feb 2024 12:03:08 -0800 Subject: [PATCH] Tweak docs --- src/common/CoreTerminal.ts | 9 --------- src/headless/Terminal.ts | 9 --------- typings/xterm-headless.d.ts | 16 ++++++++-------- typings/xterm.d.ts | 16 ++++++++-------- 4 files changed, 16 insertions(+), 34 deletions(-) diff --git a/src/common/CoreTerminal.ts b/src/common/CoreTerminal.ts index b6242458..327b8bc2 100644 --- a/src/common/CoreTerminal.ts +++ b/src/common/CoreTerminal.ts @@ -168,15 +168,6 @@ export abstract class CoreTerminal extends Disposable implements ICoreTerminal { this._writeBuffer.writeSync(data, maxSubsequentCalls); } - /** - * Input data to application side. - * The data is treated the same way as typed input at the terminal. - * (will appear in the onData event). - * wasUserInput indicates, whether the input is genuine user input. - * It is true by default and triggers additional actions like prompt focus or selection clearing. - * Set it to false if your data sent does not resemble what a user would have typed - * (e.g. sequence embedded data). - */ public input(data: string, wasUserInput: boolean = true): void { this.coreService.triggerDataEvent(data, wasUserInput); } diff --git a/src/headless/Terminal.ts b/src/headless/Terminal.ts index a5f7736a..66040756 100644 --- a/src/headless/Terminal.ts +++ b/src/headless/Terminal.ts @@ -81,15 +81,6 @@ export class Terminal extends CoreTerminal { this._onBell.fire(); } - /** - * Input data to application side. - * The data is treated the same way as typed input at the terminal. - * (will appear in the onData event). - * wasUserInput indicates, whether the input is genuine user input. - * It is true by default and triggers additional actions like prompt focus or selection clearing. - * Set it to false if your data sent does not resemble what a user would have typed - * (e.g. sequence embedded data). - */ public input(data: string, wasUserInput: boolean = true): void { this.coreService.triggerDataEvent(data, wasUserInput); } diff --git a/typings/xterm-headless.d.ts b/typings/xterm-headless.d.ts index 81a6aad1..b2ad5745 100644 --- a/typings/xterm-headless.d.ts +++ b/typings/xterm-headless.d.ts @@ -719,14 +719,14 @@ declare module '@xterm/headless' { onTitleChange: IEvent; /** - * Input data to application side. - * The data is treated the same way as typed input at the terminal - * (will appear in the onData event). - * wasUserInput indicates, whether the input is genuine user input. - * It is true by default and triggers additional actions like prompt - * focus or selection clearing. - * Set it to false if your data sent does not resemble - * what a user would have typed (e.g. sequence embedded data). + * Input data to application side. The data is treated the same way input + * typed into the terminal would (ie. the {@link onData} event will fire). + * @param data The data to forward to the application. + * @param wasUserInput Whether the input is genuine user input. This is true + * by default and triggers additionalbehavior like focus or selection + * clearing. Set this to false if the data sent should not be treated like + * user input would, for example passing an escape sequence to the + * application. */ input(data: string, wasUserInput?: boolean): void; diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index 3de30524..d957d655 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -964,14 +964,14 @@ declare module '@xterm/xterm' { focus(): void; /** - * Input data to application side. - * The data is treated the same way as typed input at the terminal - * (will appear in the onData event). - * wasUserInput indicates, whether the input is genuine user input. - * It is true by default and triggers additional actions like prompt - * focus or selection clearing. - * Set it to false if your data sent does not resemble - * what a user would have typed (e.g. sequence embedded data). + * Input data to application side. The data is treated the same way input + * typed into the terminal would (ie. the {@link onData} event will fire). + * @param data The data to forward to the application. + * @param wasUserInput Whether the input is genuine user input. This is true + * by default and triggers additionalbehavior like focus or selection + * clearing. Set this to false if the data sent should not be treated like + * user input would, for example passing an escape sequence to the + * application. */ input(data: string, wasUserInput?: boolean): void;