[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:37:31 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> For instance, I have a pedal that's a USB HID thingie. Amusingly
> enough, stomping on the pedal gives me a "b" event. The key "b",
> indistinguishable from a "b" from the keyboard.
Exactly. This is partly the sort of use case I designed this feature
for.
> So if I could somehow say
>
> (keymap-set global-mode-map "[device footpad]-b" 'do-something)
>
> that would be ideal.
Oh yes, that would be good as well. We could have the ability to bind
keys to individual devices.
I could imagine a different API that didn't put the device name into the
name of the key, though: there could be a system for making keymaps
"device-local", or even better device-specific bindings in a keymap:
(keymap-set global-mode-map "b" #'do-something "name of footpad")
And the "name of footpad" can reasonably be system dependent, since the
user will be making such a customization, and he can look in the output
of `xinput list' (or the system's input preferences.)
We could also have a system like:
(keymap-set global-mode-map "<wheel-down>"
#'pixel-scroll-precision-interpolate 'mouse)
Where the last part doesn't have to be window system dependent, as long
as it's one of the values documented in `device-class'.
This is likely to make some things mysterious, so it will probably need
adjustment to the `describe-keymap' output.
- 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, 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, 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, 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 <=
- 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
- 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
- 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, Stefan Monnier, 2022/04/10