Repository navigation
Conversation
Every key bar tap ended in terminal.focus() - sendKey(), paste() and the CTRL/ALT handlers all called it - and focusing the terminal's textarea is what raises the soft keyboard. Tapping ESC or an arrow with the keyboard dismissed popped it back open over half the screen. The bar now restores focus only when the terminal had it at pointerdown, i.e. when the keyboard was already up. With the keyboard down, keys go to the shell and it stays down; the keyboard button remains the explicit way to raise it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every tap on the mobile key bar ended in
terminal.focus()—sendKey(),paste()and the CTRL/ALT handlers all called it — and focusing xterm's textarea is exactly what raises the soft keyboard. So with the keyboard dismissed (to read output, say), tapping ESC, an arrow or CTRL popped it back open over half the screen.The key bar now records on
pointerdownwhether the terminal had focus, and restores focus after the tap only in that case:sendKey()andpaste()no longer move focus themselves; the key bar decides.Ctrl+Shift+V/⌘Vstill paste with the terminal already focused.Testing
npm run typecheckandnpm run buildpass.main, tapping ESC with the terminal unfocused focuses it (keyboard opens); with this change it sends\x1band focus stays where it was. With the terminal focused, tapping TAB sends\tand keeps focus.npm test:resize reaches the PTYanda dropped connection keeps the shell alive…fail on unmodifiedmaintoo in my environment (Debian 13, Node 24). This change only touches the frontend.