Repository navigation
fix(terminal): don't double a desktop dead key, and bracket Ctrl+V after replay - #726
Conversation
KeyCode 229 recovery forwarded a composed character that xterm had already delivered, so a desktop dead-key backtick arrived twice. create() now attaches only when the primary pointer is coarse. Ctrl+V text paste went through terminal.paste(), which drops the CSI 200~/201~ markers after a replay clears xterm's DECSET 2004 mirror. Plain text is now a hand-built bracketed frame on the session input path. Fixes Ark0N#716 Co-authored-by: DDT <1786035110@qq.com>
|
Thanks a lot for this, @Hugo-DDT. It fixes both parts of #716: the soft-keyboard recovery now stays off on a fine pointer, so a desktop dead key arrives once, and plain-text Ctrl+V is framed as a bracketed paste by Codeman itself, so a replay can no longer turn a copied newline into a submit. The tests are good: every new case fails against master's code and passes here, and the browser wiring suite passes too. I also checked the premise on tmux 3.4: tmux strips CSI 200~/201~ for a pane that never enabled bracketed paste and forwards them for one that did, so always sending the frame is safe. A few small things:
None of this changes the fix itself. If you push 1 and 2 this is ready to merge; otherwise they are small enough to apply on top at merge time. |
Hand the bracketed frame to the target terminal with input() so onData scrolls to the bottom, clears the selection, and delivers the bytes. The paste trap no longer writes the frame itself. Fixes Ark0N#716 Co-authored-by: DDT <1786035110@qq.com>
|
Thanks @Hugo-DDT for the quick follow-up. The second commit took the I ran typecheck, lint, the format and frontend checks, the full At merge time I will update two comments in Merging. |
) Ctrl+V's hand-built bracketed paste (#726) and the phone composer's dropped CSI 200~/201~ markers from the text in ONE pass, so a clipboard carrying ESC[20 ESC[201~ 1~ came out of it with an ESC[201~ that ended the frame early: everything after it was typed as keys and each CR ran. Both now strip until nothing matches. The composer's copy predates this release; it is the same one-liner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…release review, #726) #726 attaches the keyCode 229 recovery only when (pointer: coarse) matches, which keeps a desktop dead key from arriving twice. Chromium reports the PRIMARY pointer as fine once a mouse, a trackpad cover or a stylus is attached, so on such an Android device the module was off while the text still came from the soft keyboard, and the #441 dropped last character and the #541 autocorrect duplication came back. The gate is now a coarse pointer OR an Android user agent. Android ran the recovery unconditionally before #726, so this only keeps that; a desktop (fine pointer, not Android) and a touchscreen laptop stay off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged in 1.47.0 (https://github.com/Ark0N/Codeman/releases/tag/codeman%401.47.0). Thank you for taking both review points into the second commit, and for removing the duplicate delivery path along the way. The release review added two fixes on top: the nested-marker strip now repeats until nothing matches (9f7cba0), because one pass over |
Fixes #716.
KeyCode 229 recovery now attaches only when matchMedia('(pointer: coarse)') matches, so a desktop dead-key backtick is delivered once. Coarse pointers keep the soft-keyboard recovery.
Ctrl+V plain text is a hand-built bracketed paste on the session input path (nested 200~/201~ stripped, newlines normalized to CR). Image and file upload is unchanged.
Tests: test/terminal-keycode229-recovery.test.ts, test/terminal-tile-input.test.ts, test/image-paste-trap.test.ts. The browser wiring suite emulates a coarse pointer and asserts a fine pointer installs nothing.