fix(app): stop terminal autofocus on shortcuts (#18931)

This commit is contained in:
Shoubhit Dash
2026-03-24 16:46:16 +05:30
committed by GitHub
parent d3debc191f
commit fde201c286
3 changed files with 36 additions and 2 deletions

View File

@@ -93,6 +93,13 @@ export const focusTerminalById = (id: string) => {
return true
}
const skip = new Set(["Alt", "Control", "Meta", "Shift"])
export const shouldFocusTerminalOnKeyDown = (event: Pick<KeyboardEvent, "key" | "ctrlKey" | "metaKey" | "altKey">) => {
if (skip.has(event.key)) return false
return !(event.ctrlKey || event.metaKey || event.altKey)
}
export const createOpenReviewFile = (input: {
showAllFiles: () => void
tabForPath: (path: string) => string