From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Disabling mouse input Date: Sat, 02 Nov 2024 20:32:11 +0200 Message-ID: <867c9lxz9w.fsf@gnu.org> References: <86sesaytjn.fsf@gnu.org> <4p6cs2adzzqihjdustvlklr3ykrrz7eq7rtz2ciywcyevgmoej@klyfgnsjtnti> <86h68py3zy.fsf@gnu.org> <86fro9y3ki.fsf@gnu.org> <86bjyxy1nh.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30135"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dradetsky@gmail.com, luangruo@yahoo.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 02 19:33:02 2024 Return-path: Envelope-to: ged-emacs-devel@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 1t7Ivm-0007bV-Cv for ged-emacs-devel@m.gmane-mx.org; Sat, 02 Nov 2024 19:33:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7Iv4-00074j-2I; Sat, 02 Nov 2024 14:32:18 -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 1t7Iv2-00074N-8x for emacs-devel@gnu.org; Sat, 02 Nov 2024 14:32:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7Iv1-0000kw-1q; Sat, 02 Nov 2024 14:32:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=y8n1M6VtMXfjQvzqeKD7kP8YXrwNL74v22T05tdoUcM=; b=mz0MGwkU+c4W S6vG3Ba5eqKPgbHs0ufQ4gqzp2CJVzNS0Mc1OGn7o6VbfIX88OEymoQ/XHcR5fZdkelWa+1SWZ3ha BZJsSCd1xBtD58Ap+PLDV4Aj/joByjKLRdP4Tyif0qfIT+7FnCywIcyEMIGh8ZCRyavvHgCQHoC78 IFsciBlsRAXRa1ziRPoDhT6E1KK+crtNouLNi3GpMARVnaXni7xfCtU9PwtQmamKmbyNowsryjHIq H6sC6IL3IqfPHNNchZhbXGiG2sOVwMOv+Ad04zZu4Sr5gK7UkEvVPw97Y+0ZPXhJmFh5VC+Khfewt c3/qpX/hhSqGssvJFN5QDQ==; In-Reply-To: (message from Stefan Monnier on Sat, 02 Nov 2024 14:11:58 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325027 Archived-At: > From: Stefan Monnier > Cc: dradetsky@gmail.com, luangruo@yahoo.com, emacs-devel@gnu.org > Date: Sat, 02 Nov 2024 14:11:58 -0400 > > >> IIUC the problematic events tend to occur "in the middle of other > >> events", because they are generated as a side effect of the hand > >> movement that causes the other events, so I suspect the effect on > >> `while-no-input` is not particularly important. > > I'm not sure I would be happy relying on that, or in general that such > > events will be seen in the queue, > > Maybe. AFAICT the fundamental problem is a hardware problem (where the > touchpad sometimes registers events which were not intended) and > disabling all mouse events in Emacs is just one of the workarounds the > OP considered taking. > > While I'm sure other people are faced with the same problem, I can't see > any evidence that it's a very common wish, so I'd rather not make the > C input code even more hairy than it already is by adding ad-hoc code > for that if there's a way to get 99% of the result with > a Lisp-only solution. If the OP is happy with this kind of solution, I don't mind. > > but there's AFAIU a larger problem with this method: it requires users > > to add a lot of events to the list of events "disabled" via this > > method. It is also not very future-proof, I think. E.g., what about > > drag-N, drag-n-drop, etc.? My understanding was that the OP wanted > > a way of disabling mouse events without the need to go though all the > > possible symbols Emacs uses for them. > > Indeed, and this is a much wider problem. > E.g. for many years I had exactly such a nasty list of bindings to remap > all the variations of `mouse-4/5` events to `wheel-up/down`. And then what to do with track-mouse?