[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: |
Eli Zaretskii |
Subject: |
Re: master 3b41141708: Expose the name of an event's input device to Lisp |
Date: |
Sat, 09 Apr 2022 22:18:37 +0300 |
> From: Brian Cully <bjc@spork.org>
> Cc: Lars Ingebrigtsen <larsi@gnus.org>, luangruo@yahoo.com,
> monnier@iro.umontreal.ca, rms@gnu.org, emacs-devel@gnu.org
> Date: Sat, 09 Apr 2022 13:52:52 -0400
>
> > I would hope that such an event could be called just 'footpad-b', so
> > that any device capable of such events could be implemented as
> > emitting it, regardless of the device name/type/etc.
>
> 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?
The same way any other input event works: Emacs generates a Lisp form
of each event in low-level C code.
> 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.
>
> 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.
When your device behaves like a joystick, it will emit events that
joysticks produce, and Emacs will treat that as a joystick.
If this still doesn't help, my suggestion is to follow the code that
produces existing events in Emacs, for example mouse events.
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, (continued)
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Stefan Monnier, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Lars Ingebrigtsen, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Brian Cully, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp,
Eli Zaretskii <=
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Brian Cully, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Brian Cully, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/10
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/10
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/10
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/10