Skip to content

Commit 9441ba8

Browse files
committed
fix multi-input to use onData instead of onKey
1 parent dc4acc7 commit 9441ba8

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

frontend/app/view/term/termwrap.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ export class TermWrap {
238238
async initTerminal() {
239239
const copyOnSelectAtom = getSettingsKeyAtom("term:copyonselect");
240240
this.toDispose.push(this.terminal.onData(this.handleTermData.bind(this)));
241-
this.toDispose.push(this.terminal.onKey(this.onKeyHandler.bind(this)));
242241
this.toDispose.push(
243242
this.terminal.onSelectionChange(
244243
debounce(50, () => {
@@ -340,12 +339,6 @@ export class TermWrap {
340339
return;
341340
}
342341

343-
if (this.pasteActive) {
344-
if (this.multiInputCallback) {
345-
this.multiInputCallback(data);
346-
}
347-
}
348-
349342
// IME Deduplication (for Capslock input method switching)
350343
// When switching input methods with Capslock during composition, some systems send the
351344
// composed text twice. We allow the first send and block subsequent duplicates.
@@ -367,12 +360,7 @@ export class TermWrap {
367360
}
368361

369362
this.sendDataHandler?.(data);
370-
}
371-
372-
onKeyHandler(data: { key: string; domEvent: KeyboardEvent }) {
373-
if (this.multiInputCallback) {
374-
this.multiInputCallback(data.key);
375-
}
363+
this.multiInputCallback?.(data);
376364
}
377365

378366
addFocusListener(focusFn: () => void) {

0 commit comments

Comments
 (0)