GNU bug report logs - #73469
29.4; mouse passing on terminal window generates events

Previous Next

Package: emacs;

Reported by: Francesco Potortì <Potorti <at> isti.cnr.it>

Date: Wed, 25 Sep 2024 12:25:02 UTC

Severity: normal

Found in version 29.4

Full log


Message #26 received at 73469 <at> debbugs.gnu.org (full text, mbox):

From: Francesco Potortì <Potorti <at> isti.cnr.it>
To: Jared Finder <jared <at> finder.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 73469 <at> debbugs.gnu.org
Subject: Re: bug#73469: 29.4; mouse passing on terminal window generates events
Date: Sun, 29 Sep 2024 22:07:01 +0200
>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 <at> pot:~$ echo -e "\e[?1000h"

pot <at> pot:~$ echo -e "\e[?1003h"

pot <at> pot:~$ echo -e "\e[?1006h"

pot <at> pot:~$ # now moving the pointer
pot <at> 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 <at> pot:~$ # left and center clicks:
pot <at> pot:~$ #0;4;32M0;4;32m1;4;32M1;4;32m
pot <at> pot:~$ # mouse wheel:
pot <at> pot:~$ #64;4;32M65;4;32M64;4;32M64;4;32M65;4;32M65;4;32M
pot <at> pot:~$ # now, disabling mode 1015
pot <at> pot:~$ echo -e "\e[?1015l"

pot <at> pot:~$ # moving the mouse pointer:
pot <at> 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 <at> pot:~$ # left and center clicks:
pot <at> pot:~$ # 0;2;31M0;2;31m1;2;31M1;2;31m
pot <at> pot:~$ # mouse wheel:
pot <at> pot:~$ # 64;2;31M64;2;31M65;2;31M65;2;31M65;2;31M
pot <at> 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.




This bug report was last modified 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.