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 08:51:49 -0400
User-agent: mu4e 1.6.10; emacs 29.0.50

Eli Zaretskii <eliz@gnu.org> writes:

> Are you saying that querying the system about the connected mice will
> enumerate them in random order every time the system is restarted?

        This is, in the general sense, correct. While enumeration often
appears stable, that’s more due to users not often changing their
system, and when they do, enumeration order is not normally a factor in
how a device functions, so even if things do get re-ordered, no one
tends to care. Users do also unplug and replug USB devices pretty
frequently, and that changes the device address. At least on Linux,
that’s a monotonically increasing counter, and old device addresses
aren’t reused until you wrap the counter.

        And then there’s things like Bluetooth, where devices absolutely
do come and go at seemingly random as low power states are entered and
left, so enumeration order (such as it is) is a complete wash.

        I’m not sure how the device naming system in various GUIs reacts
to having multiple, identical devices attached, but a conservative guess
would be that they’re disambiguated by enumeration order, in which case
even the device name isn’t stable in the presence of identical devices
coming and going. There are, of course, stable identifiers (serial
number, bluetooth device ID), but I don’t know if those are used for
naming purposes. I don’t know how common a situation this is, or if
anything can even be done about it, but it’s worth mentioning since it’s
come up more than once in this discussion.

-bjc



reply via email to

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