| author | |
| committer | |
| log | 0f184c28b056b977593fa7f850217063d3043642 |
| tree | d301bdc97343a5997ea3b76c8b27b0410e084b39 |
| parent | a3b1df5224700a1d76e590e4d7b29fd5a7a8e4d6 |
| signature | Signed by PGP key B5690EEEBB952194 |
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>2 files changed, 11 insertions(+), 2 deletions(-)
apps/web/src/components/ChatView.tsx+2-2| ... | @@ -2290,8 +2290,8 @@ export default function ChatView(props: ChatViewProps) { | ... | @@ -2290,8 +2290,8 @@ export default function ChatView(props: ChatViewProps) { |
| 2290 | event.stopPropagation(); | 2290 | event.stopPropagation(); |
| 2291 | void runProjectScript(script); | 2291 | void runProjectScript(script); |
| 2292 | }; | 2292 | }; |
| 2293 | window.addEventListener("keydown", handler); | 2293 | window.addEventListener("keydown", handler, true); |
| 2294 | return () => window.removeEventListener("keydown", handler); | 2294 | return () => window.removeEventListener("keydown", handler, true); |
| 2295 | }, [ | 2295 | }, [ |
| 2296 | activeProject, | 2296 | activeProject, |
| 2297 | terminalState.terminalOpen, | 2297 | terminalState.terminalOpen, |
apps/web/src/keybindings.test.ts+9| ... | @@ -131,6 +131,15 @@ describe("isTerminalToggleShortcut", () => { | ... | @@ -131,6 +131,15 @@ describe("isTerminalToggleShortcut", () => { |
| 131 | isTerminalToggleShortcut(event({ ctrlKey: true }), DEFAULT_BINDINGS, { platform: "Win32" }), | 131 | isTerminalToggleShortcut(event({ ctrlKey: true }), DEFAULT_BINDINGS, { platform: "Win32" }), |
| 132 | ); | 132 | ); |
| 133 | }); | 133 | }); |
| 134 | |||
| 135 | it("matches Ctrl+J on non-macOS while terminalFocus is true", () => { | ||
| 136 | assert.isTrue( | ||
| 137 | isTerminalToggleShortcut(event({ ctrlKey: true }), DEFAULT_BINDINGS, { | ||
| 138 | platform: "Win32", | ||
| 139 | context: { terminalFocus: true }, | ||
| 140 | }), | ||
| 141 | ); | ||
| 142 | }); | ||
| 134 | }); | 143 | }); |
| 135 | 144 | ||
| 136 | describe("split/new/close terminal shortcuts", () => { | 145 | describe("split/new/close terminal shortcuts", () => { |