From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jared Finder via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73469: 29.4; mouse passing on terminal window generates events Date: Sat, 05 Oct 2024 08:15:41 -0700 Message-ID: <9132263fe833d4323f428460c2f3013e@finder.org> References: <861q17d9f0.fsf@gnu.org> <86plop8kbk.fsf@gnu.org> <061a28e3635baae59f37a94bbe37d295@finder.org> <8f37fa3bd8db84dc9bd90346d88f4200@finder.org> Reply-To: Jared Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="692"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 73469@debbugs.gnu.org To: Francesco =?UTF-8?Q?Potort=C3=AC?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 05 17:16:20 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sx6W3-000AXQ-LP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Oct 2024 17:16:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sx6Vm-0008FS-7V; Sat, 05 Oct 2024 11:16:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sx6Vi-0008FD-GS for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2024 11:15:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sx6Vi-0001O3-8Q for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2024 11:15:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:MIME-Version:To:Subject; bh=j03mPHBcQYU3PxC+kz8o096SzDQBqinXnJp4Z031RQU=; b=C451U3I3nkJoWWhIJvDZ6BY5dfwAxM4dJSR/dYr+lSa1VeZLaX/wATRPQUwLRyQbWOU8exkUSkLA427N/bEiaQtV8LIXHb3KBfoLHL8hZ8WlWOI1Z6qLQtQDxDdrhKUwzV+2eVfDxmIwyI6XkTnucHYAxx0BnuzrBZ3E5/BR8BXejXPJj3cKTExD2jnDi15KP8PbCIrmLT/sqEt7ReGEiRLCWeANjSsSdqrdRBYk6nj1dx27PoUNuAtG3KA/+a2w5+zNJcpJMBsIT1ywY/EDbAYS/qyE/yFdJJ4VU9ducHAxPiGLIjSn4Dy4bTkeGx/8e0o5+WXYVcASjvXoIAxLOQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sx6Vm-0005N6-GN for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2024 11:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jared Finder Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Oct 2024 15:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73469 X-GNU-PR-Package: emacs Original-Received: via spool by 73469-submit@debbugs.gnu.org id=B73469.172814135020628 (code B ref 73469); Sat, 05 Oct 2024 15:16:02 +0000 Original-Received: (at 73469) by debbugs.gnu.org; 5 Oct 2024 15:15:50 +0000 Original-Received: from localhost ([127.0.0.1]:39380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sx6VZ-0005Me-SR for submit@debbugs.gnu.org; Sat, 05 Oct 2024 11:15:50 -0400 Original-Received: from greenhill.hpalace.com ([192.155.80.58]:50392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sx6VX-0005MU-9z for 73469@debbugs.gnu.org; Sat, 05 Oct 2024 11:15:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=finder.org; s=2018; t=1728141341; bh=ZWtsKJsz1oa2qsRK3+ffpqyDQpTDJrcqJIS+A4P+eRc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ra99eApxval8j1DJbXhdy2bbzNW/HcLsbunrcJ77QS7VEh817HwC9wR9DLgyqbHA9 X8LRqngd8ZxHZ0wS0ekP1zKEuAslsgVMIBj7zP49vsuDZktsgxz9q6m63N35D0MbTj UUVxEXq6mCsbOSWteUey1ctGHnkKWbkcns2K76BUINPh7P9km+6SX3uu+3Ylt6YJKG r/3n7b/4W0i2lywyKM/dDC8/2MLWuRviwgmUPYAQbuZRzFkWG3Sqxud36P14x1EuN4 deg3njij8fYBKYunX3LNzswWI+hslj2Kor+vY+hIO+Q0QGsJNJH332NoZp7YQ4LHOe e2dS1nEYPwBzA== Original-Received: from mail.finder.org (unknown [192.155.80.58]) by greenhill.hpalace.com (Postfix) with ESMTPSA id 7E6744A1; Sat, 5 Oct 2024 15:15:41 +0000 (UTC) In-Reply-To: X-Sender: jared@finder.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293043 Archived-At: On 2024-09-29 13:07, Francesco Potortì wrote: > > 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 This is odd and indicates of a bug outside of Emacs. A mouse move with no buttons down should be sending lowercase m, not uppercase M. This is aligned with what the Emacs lossage reported, though we can't see the initial ESC [ M characters as the terminal tries to interpret that. > ~$ # 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 This may be ok; it depends on if it is prefixed with ESC [ M (bad!) or ESC [ < (good!). > ~$ # 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 This is also odd. The wheel is supposed to look mouse buttons 4 and 5 which is accurately represented here. However, the terminal is only sending button down (suffixed with M) and no button up (suffixed with m). > ~$ # now, disabling mode 1015 > ~$ echo -e "\e[?1015l" All the events here looked the same. > Now the same on the same terminal, but outside of Screen Again, all the events here looked the same, though like before I couldn't see if the prefix was ESC [ M (bad!) or ESC [ < (good!). Thank you so much for all this testing. I'm fairly confident this is not an issue in Emacs and probably not in screen as well. That means we can rely on view-lossage for accurate character reporting to diagnose what's going on, which is nice because we can see the escape sequence prefix. For next steps I am considering adding a workaround and want to verify the behavior is easy to implement and maintain. Unfortunately since I can't reproduce your issue locally, I do need more info from you if you have time. I want to see those escape sequence prefixes for both today and the state prior 0695c9e8599b5036a80361571e7cb0ea9fdead99 from 2020 which added mouse movement tracking. Can you please report the lossage for the same mouse move, mouse button, and mouse wheel test within Emacs and report the lossage? You already did mouse move earlier, so I'm just looking for mouse button click and mouse wheel scroll. After that, can you please try altering xterm-mouse--tracking-sequence, replacing 1003 with 1002 before enabling xterm-mouse-mode. (This was the state prior to mouse movement tracking being supported.) Please do this in a fresh Emacs session before enabling xterm-mouse-mode the first time. Then report the same mouse move (I'm expecting no characters here), mouse click, and mouse wheel lossage. Thank you! -- MJF