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: Po Lu
Subject: Re: master 3b41141708: Expose the name of an event's input device to Lisp
Date: Sun, 10 Apr 2022 08:54:01 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

Brian Cully <bjc@spork.org> 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’ve got a Steam Controller I can set up as a joystick, keyboard
> (HID report and boot protocols), relative and absolute mouse, all at the
> same time, and I can swap its functions on the fly. I’ve got a mouse
> that can send both “pixel” scroll events as well as normal line-based
> ones depending on how it’s configured. I have a programmable keyboard
> that I can make look like any USB device I want.

That can be identified by the kind of event it is currently sending.
When it sends "smooth" scroll events, Emacs gets a wheel event with the
right valuators.  When it sends line-based scroll events, Emacs gets one
without.  If it's configured as a relative mouse, Emacs will get mouse
movement events; as an absolute mouse, touch events (I think).

>      Is Emacs going to be responsible for mapping thousands of device
> identifiers to device classes (which may change at runtime?) I just
> don’t understand what this looks like from a user’s perspective.

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.


reply via email to

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