From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: master 3b41141708: Expose the name of an event's input device to Lisp Date: Sun, 10 Apr 2022 16:50:40 +0800 Message-ID: <8735ilcof3.fsf@yahoo.com> References: <164933858147.29834.15050766441005536059@vcs2.savannah.gnu.org> <87tub4uivu.fsf@yahoo.com> <83y20fakwn.fsf@gnu.org> <87o81bu7zj.fsf@yahoo.com> <83v8vjai4s.fsf@gnu.org> <87bkxbsqfl.fsf@yahoo.com> <835yniah0u.fsf@gnu.org> <8735impqw4.fsf@yahoo.com> <83v8vi8uyu.fsf@gnu.org> <871qy6o9p3.fsf@yahoo.com> <83o81a8qnd.fsf@gnu.org> <87zgkulbuu.fsf@yahoo.com> <83ilri8iag.fsf@gnu.org> <87k0by43an.fsf@gnus.org> <87bkx9lqno.fsf@yahoo.com> <8335il8p4c.fsf@gnu.org> <874k31h3kz.fsf@yahoo.com> <83y20d7808.fsf@gnu.org> <875ynhe6mx.fsf@yahoo.com> <83r165735n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25460"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: larsi@gnus.org, emacs-devel@gnu.org, monnier@iro.umontreal.ca, rms@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 10 10:53:16 2022 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 1ndTJr-0006Np-O9 for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Apr 2022 10:53:15 +0200 Original-Received: from localhost ([::1]:44666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndTJq-0002WX-EN for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Apr 2022 04:53:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndTHb-0000ed-Hr for emacs-devel@gnu.org; Sun, 10 Apr 2022 04:50:55 -0400 Original-Received: from sonic313-10.consmr.mail.ne1.yahoo.com ([66.163.185.33]:32940) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ndTHY-00015I-B2 for emacs-devel@gnu.org; Sun, 10 Apr 2022 04:50:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649580650; bh=vfDWbUAN0FG3M7GjYilHPA6w34iVJAmEloA+nE9TwwI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=rGcGMb9kxfZlmuSo6ro9inbXtKMhCgGEPEFM7RPxg6lfN3WY0cN9CaHKIV1EtGjnF6Uj3BCwP2ChH7h9zKAtLSB55nakG6bx4j3ZZncYqLlYgCppmAsNH+NY6ssLJFH7dw1bKGtSImalm/LFLARZimM7YKr/2jb8HAqiKjY0ovoX2J6xJpkbyr1969f9PJ+ATR3inIPVlICcbtFikFbh55mAKBnVVwt2qJka/VInMjAPUTtQ7R4Czb5uhPoNijN5ghjDJhjFGmxVyfFWhuuXzHlYcTOoAjW3EbZa/Hy9nj3+8TaBfg4ENe989kJ01OCsxsolo6qWP/g9W60ZtA9CKA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649580650; bh=2Y0ONgtFNi4kBknD5yc5rOJ+/tOuHxw81AO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I_pZJd5XJ.SONZZ.uaOFhBWX5ZLJrwc8h1T3zioJ7oW5abvTyyiHwQiEcPVX x6ARQDtTLdYiNmaODeydQ79hZ2R5ZHVFjLINITHf5Ae2NlzTbVefPtE.7wHIiaFmQgGRq_V6X4b. TV0Zf5VMeKTyB4bh1kv7NYoEbOC1xc6436l6PfvEq4 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Sun, 10 Apr 2022 08:50:50 +0000 Original-Received: by hermes--canary-production-sg3-65d7bd97b5-8hnzk (VZM Hermes SMTP Server) with ESMTPA ID b2b44f978196794d75c7a62fc03cad8b; Sun, 10 Apr 2022 08:50:44 +0000 (UTC) In-Reply-To: <83r165735n.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 10 Apr 2022 11:28:52 +0300") X-Mailer: WebService/1.1.20048 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.185.33; envelope-from=luangruo@yahoo.com; helo=sonic313-10.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.devel:288120 Archived-At: Eli Zaretskii writes: > My point is: Emacs should use the information about the device where > it generates the Lispy event. At that point, we should generate a > different Lispy event for a device whose events we want to handle > differently. On the higher levels, the device information should not > be necessary for processing those Lispy events. > > How does my point above contradict the data you show about these two > devices? > I hope my response above explains why I think the need to know the > device info can and should stop at the level where we produce the > Lispy event objects. Hmm... how about a variable `device-function-key-alist', which maps device names and classes to the corresponding function key? The code to read events could then be changed to add such a function key when an event is received for the suitable type of device. For example, pixel-scroll-precision-mode could add ((class mouse) . coarse-mouse) to that list, which would make events coming from a mouse report themselves with the fake function key `coarse-mouse'. Then, the command to scroll with interpolation could be bound to [coarse-mouse wheel-down]. Or Lars could specify ("Name of footpad device" . footpad), and bind the appropriate commands to [footpad a], [footpad b] and so on? WDYT?