From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Brian Cully Newsgroups: gmane.emacs.devel Subject: Re: master 3b41141708: Expose the name of an event's input device to Lisp Date: Sat, 09 Apr 2022 21:46:24 -0400 Message-ID: <874k31bsvw.fsf@ditto.jhoto.spork.org> 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> <838rse89vr.fsf@gnu.org> <87czhqb0l2.fsf@ditto.jhoto.spork.org> <87k0bxkbbq.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27668"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.10; emacs 29.0.50 Cc: Eli Zaretskii , emacs-devel@gnu.org, Lars Ingebrigtsen , rms@gnu.org, monnier@iro.umontreal.ca To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 10 04:01:19 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 1ndMtC-00071M-O0 for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Apr 2022 04:01:19 +0200 Original-Received: from localhost ([::1]:36990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndMtB-0002TK-Cd for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Apr 2022 22:01:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndMs2-0001lh-K0 for emacs-devel@gnu.org; Sat, 09 Apr 2022 22:00:06 -0400 Original-Received: from coleridge.kublai.com ([166.84.7.167]:51275 helo=mail.spork.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndMs1-0005gp-11; Sat, 09 Apr 2022 22:00:06 -0400 Original-Received: from ditto (unknown [IPv6:2001:470:1f07:1b9:8650:a942:ec5e:856b]) by mail.spork.org (Postfix) with ESMTPSA id AD23733D7; Sat, 9 Apr 2022 21:59:31 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1649555989; bh=Pv30R/WEumLbHqEy7UZTqyrAqV6XHduvhxS0IsiT/0U=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=rxQcLkzMZMP8C9ED7TCMvPwbC8Hc2nW+IMr4z+/Jl/RHrC5C/eOvy48vJYI+SeWwz yVS3OPI62MQwAzhFAYLrp/f4IpPOBMqZkUZ9mP348tf5CZiTNsjUXJ95KqsnMS9oR4 P+o/QtGPWLg9JVeMRbgyrmISHA9PILVgSE62+s6w= In-reply-to: <87k0bxkbbq.fsf@yahoo.com> Received-SPF: pass client-ip=166.84.7.167; envelope-from=bjc@spork.org; helo=mail.spork.org 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:288085 Archived-At: Po Lu writes: > Brian Cully writes: > >> I may have missed this earlier in the thread, but where would >> these mappings of device identifier (name, USB VID:PID, whatever) to >> device classes come from? How would that work for devices that can be >> made to look like a *lot* of different input types? > > We look at the device name provided by the X input extension. It is not > calculated based on any USB identifiers. I did not mean to imply it was, just that there was some way of obtaining a unique name for a device. >> Is Emacs going to be responsible for mapping thousands of device >> identifiers to device classes (which may change at runtime?) I just >> don=E2=80=99t understand what this looks like from a user=E2=80=99s pers= pective. > > The input driver is responsible to name the devices and to set the > appropriate properties. Otherwise the devices will not work correctly > with any other program either. But my input driver is, for instance, a USB HID driver, and only cares about the usage tables my device is using. I can plug whatever device I want in, regardless of any kind of unique or stable identifier, by virtue of it responding correctly to probes from the USB layer describing its capabilities. Everything built on top of this stack Just Works, no matter how I name the device. I see very much the value in being able to differentiate similar or identical events based on their source, but my worry has been about having Emacs somehow decide for me that because my device is named =E2=80= =9CX=E2=80=9D it has capabilities w, y, and z. In a previous email, it seems as though your thoughts are around having the user specify capabilities or event mappings themselves based on the device name. I don=E2=80=99t know nearly enough about the specifics = to comment on any particular approach, but I am reasonably sure I don=E2=80=99t want Emacs making those decisions for me. -bjc