From bea622e5e913b362378f7c7938bea028c3156745 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 17 Apr 2026 21:21:27 +0000 Subject: [PATCH] Fix keypress handling when simulateUser is enabled and add debug logging --- packages/cli/src/ui/contexts/KeypressContext.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/ui/contexts/KeypressContext.tsx b/packages/cli/src/ui/contexts/KeypressContext.tsx index 4744ecc348..b0aadbc187 100644 --- a/packages/cli/src/ui/contexts/KeypressContext.tsx +++ b/packages/cli/src/ui/contexts/KeypressContext.tsx @@ -862,8 +862,15 @@ export function KeypressProvider({ process.stdin.setEncoding('utf8'); // Make data events emit strings + debugLogger.log( + `[DEBUG] KeypressProvider simulateUser: ${config?.getSimulateUser()}`, + ); + let processor = nonKeyboardEventFilter(broadcast); - if (!terminalCapabilityManager.isKittyProtocolEnabled()) { + if ( + !terminalCapabilityManager.isKittyProtocolEnabled() && + !config?.getSimulateUser() + ) { processor = bufferFastReturn(processor); } processor = bufferBackslashEnter(processor);