t3code
t3code copied to clipboard
[Bug]: CTRL+J not closing terminal on Windows
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
- Hit CTRL+J to open the terminal (Focus goes to the terminal)
- Hit CTRL+J again to close the terminal (Terminal does not close)
- Focus on the chat and hit CTRL+J again (Terminal closes)
Expected behavior
Repeatedly hitting CTRL+J should open and close the terminal without having to manually change focus back to the chat.
Actual behavior
The CTRL+J keyboard shortcut on Windows does not work as expected.
- Opening the terminal with CTRL+J works fine.
- Closing the terminal with CTRL+J does only work when focused on the chat.
- When the focus is inside of the terminal, CTRL+J does not do anything.
- No problem when clicking the UI button to toggle the terminal
CMD+J on Mac works as expected.
Impact
Minor bug or occasional failure
Version or commit
Release 0.0.20
Environment
Windows
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
No response
Submitted a fix in https://github.com/pingdotgg/t3code/pull/2142. The global keydown listener now runs in the capture phase, so the terminal toggle fires before xterm.js can process the event on Windows.