Subject: Re: bug#45834: 28.0.50; Mouse events in terminal emacs

From: Eli Zaretskii <[email-masked]>
Date: Wed, 08 Sep 2021 16:52:17 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked]
> Date: Wed, 08 Sep 2021 15:41:29 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Actually, there could be one more way for us to get that weird echo:
> > if Emacs thought that "ESC [ I" was a prefix key.  See that dash after
> > the sequence? that's what Emacs displays after key-echo when it
> > received a partial sequence, like if you type "C-x" and wait.  So
> > perhaps somehow Emacs thinks these focus-in events are prefix,
> > i.e. incomplete key sequence.
> 
> Yes, that sounds likely.  And....  if I `C-k h C-x' and then lose focus
> and get it and then `a' and then lose and get focus and then `C-g', I
> get:
> 
> C-x a C-g (translated from C-x M-[ O M-[ I a M-[ O M-[ I C-g) is undefined

So somehow what we do in xterm-translate-focus-in causes Emacs to
interpret the sequence as an incomplete one.

Stefan, any ideas how that could happen?