<div dir="ltr"><div><div>I&#39;m trying to make emacs work well inside mintty/mosh. I&#39;d like mintty</div><div>to send an alternate escape sequence for &quot;C-Backspace&quot; than the</div><div>default (which is &quot;C-_&quot;). There is an xterm sequence for this --</div><div>&quot;\e[&gt;4;1m&quot; -- which sets the &quot;modifyOtherKeys&quot; resource. Emacs sends</div><div>that sequence on startup. When using ssh for remoting, the sequence is</div><div>passed to the client side, mintty sees it, and implements the desired</div><div>behavior.</div><div><br></div><div>The mosh terminal emulator appears to discard the sequence. There is</div><div>no matching function in terminal/terminalfunctions.cc defined for it,</div><div>so the dispatch process hits the &quot;unknown function&quot; condition in</div><div>terminal/terminaldispatcher.cc@226 (Dispatcher::dispatch()).</div><div><br></div><div>As an experiment, I&#39;ve added a terminal function for &quot;\e[&gt;4;1m&quot; and</div><div>confirmed that it sees the sequence when emacs sends it. I&#39;m stuck on</div><div>what to do next.</div><div><br></div><div>It looks like I need to add something to Terminal::DrawState, then in</div><div>Display::new_frame() look for that member and call</div><div>frame.append(&quot;\e[&gt;4;1m&quot;); That&#39;s how the &quot;mouse_reporting_mode&quot; and</div><div>similar settings are handled.</div><div><br></div><div>But this might bring up a bigger question: How should the mosh</div><div>terminal emulator interact with the client side terminal emulator? I</div><div>can add support for this specific sequence, but maybe something more</div><div>general is warranted.</div><div><br></div><div>Any advice?</div><div><br></div></div></div>