fix: let xterm.js handle keyboard input natively for scroll-on-input

Only intercept keys when mobile virtual modifier buttons are active.
Previously all special keys (Enter, Ctrl+C, arrows) were intercepted
and manually re-encoded, bypassing xterm's built-in scrollOnUserInput.
This commit is contained in:
Mohamed Boudra
2026-04-10 15:11:14 +07:00
parent 0f005172ce
commit 033c4bcbf2
2 changed files with 14 additions and 11 deletions
+1 -6
View File
@@ -88,12 +88,7 @@ export function shouldInterceptDomTerminalKey(args: {
altKey: boolean;
pendingModifiers: PendingTerminalModifiers;
}): boolean {
return (
args.key.length > 1 ||
args.ctrlKey ||
args.altKey ||
hasPendingTerminalModifiers(args.pendingModifiers)
);
return hasPendingTerminalModifiers(args.pendingModifiers);
}
export function mergeTerminalModifiers(args: {