From: "Francesco Potortì via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Jared Finder <jared@finder.org>
Cc: Eli Zaretskii <eliz@gnu.org>, 73469@debbugs.gnu.org
Subject: bug#73469: 29.4; mouse passing on terminal window generates events
Date: Sun, 29 Sep 2024 22:07:01 +0200 [thread overview]
Message-ID: <E1sv0C5-00000000WEZ-0TsV@tucano.isti.cnr.it> (raw)
In-Reply-To: <8f37fa3bd8db84dc9bd90346d88f4200@finder.org> (jared@finder.org)
>I suspect your terminal emulator or the screen utility is adding this
>additional mode. Can you try running the following commands outside of
>Emacs? I'm curious if a particular combination of screen and the
>terminal emulator is forcing mode 1015 on.
>
>To manually enable the modes, run the following commands at a shell:
>
>echo -e "\e[?1000h" # Enable mouse button down and up reporting
>echo -e "\e[?1003h" # Enable mouse movement reporting
>echo -e "\e[?1006h" # Change format to use printable numbers instead of
>encoded bytes
>
>At this point, moving a clicking the mouse will add characters to the
>input, similar to the lossage listed above.
>
>You can disable these mouse tracking modes by using "l" at the end
>instead of "h":
>
>echo -e "\e[?1000l"
>echo -e "\e[?1003l"
>echo -e "\e[?1006l"
>
>I'd also be curious if manually disabling mode 1015 does anything with
>the above modes activated. In a shell that's echo -e "\e[?1015l" and in
>Emacs that would be (send-string-to-terminal "\e[?1015l").
This is under Screen
________________________________________________________________
Sun Sep 29 21:38:26 CEST 2024
~$ echo -e "\e[?1000h"
~$ echo -e "\e[?1003h"
~$ echo -e "\e[?1006h"
~$ #35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;5M35;40;6M35;40;6M35;40;7M35;40;7M35;40;7M35;40;7M35;40;7M35;40;8M35;40;8M35;40;8M35;40;8M35;40;8M35;40;8M35;40;8M35;40;9M35;40;9M
~$ # above, I just moved the mouse pointer
~$
~$ # now, I will click left, then right, then center
~$ #0;41;9M0;41;9m35;41;9M35;41;9M1;41;9M1;41;9m
~$ # right did not work, as it is taken by mate-terminal
~$
~$ # now, I rotate the wheel
~$ # 64;41;9M64;41;9M64;41;9M65;41;9M65;41;9M65;41;9M65;41;9M64;41;9M64;41;9M65;41;9M65;41;9M
~$ # now, disabling mode 1015
~$ echo -e "\e[?1015l"
~$ # moving the mouse pointer:
~$ # 35;61;25M35;61;25M35;61;25M35;61;25M35;61;25M35;61;26M35;61;26M35;60;26M35;60;26M35;60;26M35;60;26M35;60;26M35;60;27M35;60;27M35;60;27M35;60;27M35;60;27M35;58;29M35;57;30M35;57;31M35;57;32M35;56;33M35;55;34M35;55;36M35;55;37M35;55;37M35;55;37M35;54;37M35;54;36M35;55;35M35;55;35M35;55;35M35;56;34M35;57;34M35;57;34M
~$ # left and centr clicks:
~$ # 0;57;34M0;57;34m1;57;34M1;57;34m
~$ # mouse wheel:
~$ # 64;57;34M64;57;34M64;57;34M65;57;34M65;57;34M65;57;34M65;57;34M
Now the same on the same terminal, but outside of Screen
________________________________________________________________
pot@pot:~$ echo -e "\e[?1000h"
pot@pot:~$ echo -e "\e[?1003h"
pot@pot:~$ echo -e "\e[?1006h"
pot@pot:~$ # now moving the pointer
pot@pot:~$ #35;13;5M35;13;5M35;13;5M35;14;5M35;14;5M35;14;5M35;14;5M35;14;5M35;14;5M35;14;5M35;14;5M35;15;5M35;15;5M35;15;5M35;15;5M35;15;5M35;15;5M35;15;5M35;15;5M35;15;5M35;15;5M35;15;6M35;16;6M35;16;6M35;16;6M35;16;6M35;16;6M35;16;6M35;16;6M35;16;6M35;17;6M35;17;6M35;17;6M35;17;6M35;17;6M35;17;6M35;17;6M35;17;6M35;17;6M35;18;6M35;18;6M35;18;6M35;18;6M
pot@pot:~$ # left and center clicks:
pot@pot:~$ #0;4;32M0;4;32m1;4;32M1;4;32m
pot@pot:~$ # mouse wheel:
pot@pot:~$ #64;4;32M65;4;32M64;4;32M64;4;32M65;4;32M65;4;32M
pot@pot:~$ # now, disabling mode 1015
pot@pot:~$ echo -e "\e[?1015l"
pot@pot:~$ # moving the mouse pointer:
pot@pot:~$ # 35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;5;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;32M35;4;31M35;4;31M35;3;31M35;3;31M35;3;31M35;3;31M35;3;31M35;3;31M35;3;31M35;3;31M35;3;31M35;2;31M35;2;31M35;2;31M35;2;31M35;2;31M35;2;31M
pot@pot:~$ # left and center clicks:
pot@pot:~$ # 0;2;31M0;2;31m1;2;31M1;2;31m
pot@pot:~$ # mouse wheel:
pot@pot:~$ # 64;2;31M64;2;31M65;2;31M65;2;31M65;2;31M
pot@pot:~$
>If you could try all of the above, in your shell both with and without
>screen running it would be helpful for narrowing down the source of the
>bug.
I think I have done all. I can devise many other combinations of things to try, but I am very short on time, sorry :(
> And if evaluating the send-string-to-terminal expression fixes
>things
No: I tried M-: (send-string-to-terminal "\e[?1015l") and the behaviour changes in the sense that it is more consistent, but anyway a menu pops up.
prev parent reply other threads:[~2024-09-29 20:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 12:23 bug#73469: 29.4; mouse passing on terminal window generates events Francesco Potortì via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-25 15:45 ` Eli Zaretskii
2024-09-27 7:48 ` Francesco Potortì via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-27 10:25 ` Eli Zaretskii
2024-09-28 17:50 ` Jared Finder via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-29 8:52 ` Francesco Potortì via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-29 19:10 ` Jared Finder via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-29 20:07 ` Francesco Potortì via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1sv0C5-00000000WEZ-0TsV@tucano.isti.cnr.it \
--to=bug-gnu-emacs@gnu.org \
--cc=73469@debbugs.gnu.org \
--cc=Potorti@isti.cnr.it \
--cc=eliz@gnu.org \
--cc=jared@finder.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).