bug#45834: 28.0.50; Mouse events in terminal emacs
Tested with emacs -Q -nw, in Terminal.app, with TERM=xterm-256color. The issue does not reproduce with TERM=rxvt.
If I press "C-h k", and then switch to another application, then this is registered as "ESC [ I-", and then upon switching back, as "ESC [ O-". I think this is about mouse events, in and out, or "I" and "O".
I think since I actually have M-[ bound to resize windows (without -Q), then this allows I and O to be passed to emacs and inserted as text, or for more strange behavior in other modes like evil or magit.
I'm not sure if this is considered an emacs problem, or if there is an idea for a workaround, besides perhaps unbinding M-[.
I just tested in a debian VM as well, with snapd's emacs 27.1, and the same issue occurs, C-h k, then M-TAB to switch to other application shows ESC [ I- in minibuffer. Similarly issue is seen with TERM=xterm-256color but not with rxvt.
In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.7 (Build 19H2))
of 2020-10-25 built on clay.local
Repository revision: 10ea719abcde4f2ee40e717eb846fe93f51d5d79
Repository branch: master
System Description: Mac OS X 10.15.7
value of $LANG: en_US.UTF-8
Major mode: Lisp Interaction
Minor modes in effect: