emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 3b41141708: Expose the name of an event's input device to Lis


From: Brian Cully
Subject: Re: master 3b41141708: Expose the name of an event's input device to Lisp
Date: Sun, 10 Apr 2022 21:08:29 -0400
User-agent: mu4e 1.6.10; emacs 29.0.50

Po Lu <luangruo@yahoo.com> 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 ‘lsusb -v’. 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’d 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’re Steam Controllers and I didn’t
think it worth digging them out of storage for this. However, in the
interest of using “real” devices, here’s the output of ‘libinput
list-devices’ with them plugged in.

---[snip]---
Device:           Valve Software Steam Controller
Kernel:           /dev/input/event30
Group:            4
Seat:             seat0, default
Capabilities:     keyboard pointer 
        ⋮
Device:           Valve Software Steam Controller
Kernel:           /dev/input/event29
Group:            5
Seat:             seat0, default
Capabilities:     keyboard pointer 
---[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 Steam 
Controller" (type: MOUSE, id 26)
        ⋮
[2335518.146] (II) XINPUT: Adding extended input device "Valve Software Steam 
Controller" (type: MOUSE, id 28)
---[snip]---

        The names are, unsurprisingly, identical.

-bjc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]