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: Sun, 10 Apr 2022 21:08:29 -0400 Message-ID: <87ee24xuv6.fsf@ditto.jhoto.spork.org> References: <164933858147.29834.15050766441005536059@vcs2.savannah.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> <87tub1kbkf.fsf@yahoo.com> <831qy58ofh.fsf@gnu.org> <87sfqlfomt.fsf@yahoo.com> <83wnfx77s0.fsf@gnu.org> <87o819e80r.fsf@yahoo.com> <83sfql73di.fsf@gnu.org> <87ee25cosj.fsf@yahoo.com> <83mtgt712o.fsf@gnu.org> <87r1659jey.fsf@ditto.jhoto.spork.org> <87v8vh845k.fsf@yahoo.com> <87mtgsyeg0.fsf@ditto.jhoto.spork.org> <87v8vg77vx.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="6513"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.10; emacs 29.0.50 Cc: Eli Zaretskii , emacs-devel@gnu.org, larsi@gnus.org, 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 Mon Apr 11 03:40:29 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 1ndj2a-0001WP-Co for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Apr 2022 03:40:28 +0200 Original-Received: from localhost ([::1]:40114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndj2Z-0001wE-0m for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Apr 2022 21:40:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndj15-0001FO-9D for emacs-devel@gnu.org; Sun, 10 Apr 2022 21:38:55 -0400 Original-Received: from coleridge.kublai.com ([166.84.7.167]:55417 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 1ndj13-0002jR-M6; Sun, 10 Apr 2022 21:38:55 -0400 Original-Received: from ditto (unknown [IPv6:2001:470:1f07:1b9:8650:a942:ec5e:856b]) by mail.spork.org (Postfix) with ESMTPSA id 4C72A35B0; Sun, 10 Apr 2022 21:38:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1649641102; bh=3MuTRh6AI11fzag+p6VyFvb6wiNEMhtJ7hwy5mR/Fuo=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=Yd1B1UoefO8h15oVreW+w45YkmCyHYb9DaR0E5kMLyLa5BwwI7RvRWjIgZphVEODz 0uLFGper+ENTtF9T6X+vsqhKv7EV4gTyGbBkL8ffc/Ap4oDHMcH5rxf0ePOfn+SGfn 47J81FDoko4l0OzxuZqmIfNDzJYuWheqtGKItELo= In-reply-to: <87v8vg77vx.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:288163 Archived-At: Po Lu writes: > You likely missed something, or the input driver doesn't know enough > about that specific kind of device to create a unique enough name. That would be because the only way that USB has to disambiguate otherwise identical devices is by serial number. You can verify this yourself, if you like, by looking at the output of =E2=80=98lsusb -v=E2=80= =99. I have demonstrated that libinput does not use that information to name devices and has no apparent problem re-using the same name across multiple devices. > When I insert two actual mice of the same kind (I did not flash > anything), I get two different names. Is libinput being used for your mice? I suspect that the discrepancy may arrive from different driver usage. > As I've been saying for a long time, it's modified by the input drivers, > which should behave correctly. I don't expect users to flash custom > firmware onto their mice specifically for them to look exactly like > another device. That I flashed firmware is irrelevant. I took care to allow them separate serial numbers, as they would have separate serial numbers from the factory, but otherwise identical identifiers. Do you think I missed something in my test? > I tried a real pair of the same mice and got different names, and there > isn't any more disambugating information supplied to applications (they > all rely on names being unique and as persistent as possible), so this > is not a problem in practice. So, I=E2=80=99d originally flashed my microcontroller because I thought it would be the easiest way to test things, and while I do have duplicate devices in my home, they=E2=80=99re Steam Controllers and I didn= =E2=80=99t think it worth digging them out of storage for this. However, in the interest of using =E2=80=9Creal=E2=80=9D devices, here=E2=80=99s the output= of =E2=80=98libinput list-devices=E2=80=99 with them plugged in. ---[snip]--- Device: Valve Software Steam Controller Kernel: /dev/input/event30 Group: 4 Seat: seat0, default Capabilities: keyboard pointer=20 =E2=8B=AE Device: Valve Software Steam Controller Kernel: /dev/input/event29 Group: 5 Seat: seat0, default Capabilities: keyboard pointer=20 ---[snip]--- They work in X just fine. Here are the logs about their mouse functionality: ---[snip]--- [2335445.180] (II) XINPUT: Adding extended input device "Valve Software Ste= am Controller" (type: MOUSE, id 26) =E2=8B=AE [2335518.146] (II) XINPUT: Adding extended input device "Valve Software Ste= am Controller" (type: MOUSE, id 28) ---[snip]--- The names are, unsurprisingly, identical. -bjc