Add support for debug logging of keystrokes to investigate #6227 (#6844)

Co-authored-by: Arya Gummadi <aryagummadi@google.com>
This commit is contained in:
Deepankar Sharma
2025-08-22 19:31:55 -04:00
committed by GitHub
parent fef89f5429
commit 53067fda74
7 changed files with 333 additions and 2 deletions

View File

@@ -119,6 +119,7 @@ export const AppWrapper = (props: AppProps) => {
<KeypressProvider
kittyProtocolEnabled={kittyProtocolStatus.enabled}
config={props.config}
debugKeystrokeLogging={props.settings.merged.debugKeystrokeLogging}
>
<SessionStatsProvider>
<VimModeProvider settings={props.settings}>
@@ -664,6 +665,11 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
const handleGlobalKeypress = useCallback(
(key: Key) => {
// Debug log keystrokes if enabled
if (settings.merged.debugKeystrokeLogging) {
console.log('[DEBUG] Keystroke:', JSON.stringify(key));
}
let enteringConstrainHeightMode = false;
if (!constrainHeight) {
enteringConstrainHeightMode = true;
@@ -727,6 +733,7 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
handleSlashCommand,
isAuthenticating,
cancelOngoingRequest,
settings.merged.debugKeystrokeLogging,
],
);