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 14:09:32 +0800 Message-ID: <874k31h3kz.fsf@yahoo.com> References: <164933858147.29834.15050766441005536059@vcs2.savannah.gnu.org> <83ee28az95.fsf@gnu.org> <87fsmow1hz.fsf@yahoo.com> <83a6cway59.fsf@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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38112"; 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 08:16:13 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 1ndQrs-0009mX-Df for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Apr 2022 08:16:12 +0200 Original-Received: from localhost ([::1]:36578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndQrr-0003CW-57 for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Apr 2022 02:16:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndQlk-00062A-KL for emacs-devel@gnu.org; Sun, 10 Apr 2022 02:09:52 -0400 Original-Received: from sonic313-10.consmr.mail.ne1.yahoo.com ([66.163.185.33]:37522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ndQlf-0004VF-AB for emacs-devel@gnu.org; Sun, 10 Apr 2022 02:09:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649570983; bh=e65ZCzKUmADKZ2hMOpJezx17TfNhJbsTDHf2vbjXlFc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Z5I3sxkr/XgQ94iFbCNGIuzw4E1X7ih511GTLS/hbxaBi0Y5qgwchCpz0MYa0XGImSBl402B3tsXkSGXGEUgWpJePcTlCaAm3HR2WH3yH2pNzT9CwP3ZHFYblt+KFJlRXm/uk9S4AG4IfjQVTSqwQCsryhy0kStUo0s56pLMFSund9GifksZThI6WOEwzrbgV9GLUTmpVFgd5AzXicw/biLZsQ/tJKOFZg1za+o70fC/fdOtO2OpQSvw8CDAVYD4U2199+r+ZI3XiCahZyZ4m/QVjNvi1TImQHIYyYnW17OG4AyqSyPTXAmYnm32AScsaECN9XbI69g6ESJhYKmy2A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649570983; bh=ECleZsvDFICF0oQ812EmUuh8PfZc5jL4OcHenX1P9+5=; h=X-Sonic-MF:From:To:Subject:Date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lQyKNXJSNzofHCt2SKEEvkyGK6uknR .aji6AbXAnfvXVz.GnvQclpxbADOnyxRe5zRSSRzfJwpqvqp_0ZmeDwCBtQ.tpMjeIvfcV5tJeVz 8qXrfu6Lo8l2w0abn5o20.hRmPD6EYcdHjCULlXIFA 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 06:09:43 +0000 Original-Received: by hermes--canary-production-sg3-65d7bd97b5-gqv44 (VZM Hermes SMTP Server) with ESMTPA ID a298ae62a1047511c467fbddaec64695; Sun, 10 Apr 2022 06:09:37 +0000 (UTC) In-Reply-To: <8335il8p4c.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 10 Apr 2022 08:49:07 +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:288096 Archived-At: Eli Zaretskii writes: > I think the usual Emacs abstraction centers on the events, not on > devices that emitted them. So we should be able to have devices emit > events regardless of the device type/nature/name, and then the usual > Emacs machinery of binding commands to key sequence will do the rest, > and will do it according to user expectations. It seems to me that abstraction was built around text terminals and legacy X windows behavior, which changed with the wide adoption of multiple instances of different kinds of input devices in X and elsewhere. > The key doesn't have to be a device name, it should rather describe > the general type of the event/functionality. For example, all the > devices that have foot pedals could emit events that begin with the > same pseudo-function key 'foot-pedal'. Even if the device is called > something else, and even if the device is simulated by some software > that takes input from the keyboard or the mouse. But we cannot determine whether a given device is a foot pedal without the help of the user. It's not one of the types of devices whose naming is well established (see the list in the doc string of `device-class'.) That fact doesn't apply to all devices, though, so why not have both options? There could be a "puck" or "touchpad" prefix for the devices that we can classify, and a way to name the devices (or assign prefixes to those devices) that we can not. > Users cannot customize the low-level layers of event production in > Emacs, that level must be coded by us. We shouldn't try aiming for > this goal, because it is basically unattainable, certainly as long as > we use the window-system messages as triggers for producing events > eventually exposed to Lisp. Then we won't be able to know what a foot pedal is, because presumably foot pedals just name itself something we cannot guess, like "USB USB Keyboard (1)" or "FlexMatrix HID Keyboard Controller", since it's pretending to be a keyboard. The user must determine that information from the relevant tools on his own system, i.e. by watching the output of the `xinput list' command. Thanks.