* libinput support in Eamcs?
@ 2018-08-06 14:55 Lars Ingebrigtsen
2018-08-06 15:44 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2018-08-06 14:55 UTC (permalink / raw)
To: emacs-devel
Over the weekend, I've been trying to grok the state of touch events in
Linux, and... I'm not sure I understand everything. It seems to be a
mess?
But apparently, Linux is moving away from the older input libraries
(synaptics for touchpad and libev for general events) and to libinput,
both on X and Wayland. From what I understand, it's deemed to be The
Future.
(Please correct me if I misunderstand.)
Now, for touch events: It's complicated. There are several layers of
things that block touch event handling, and to get at them all, you
either have to hack Gnome/gtk or use libevent directly. (Simple events
are available, but not things like "two finger pitch".)
So I was wondering... would it make sense to add libinput support to
Emacs?
I'm thinking of, like:
(setq events (make-network-process :family 'libinput :remote "/dev/input/input7"))
and then you'd get out something like
(:timestamp <...> :event 'button-down :x <> :y <>)
or whatever libevent returns, and you can write nice filtering functions
on that.
Or something.
You have to be in the input group to access /dev/input, though, so
that's kinda yucky.
And this is really low-level, so we'd have to write higher-level
function to translate this all to sensible events.
So I'm not sure something like this would make sense. :-) But what do
all y'all think?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: libinput support in Eamcs?
2018-08-06 14:55 libinput support in Eamcs? Lars Ingebrigtsen
@ 2018-08-06 15:44 ` Stefan Monnier
2018-08-06 15:51 ` Lars Ingebrigtsen
2018-08-06 21:28 ` Alan Third
2018-08-07 0:33 ` Richard Stallman
2 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2018-08-06 15:44 UTC (permalink / raw)
To: emacs-devel
> And this is really low-level, so we'd have to write higher-level
> function to translate this all to sensible events.
I don't think Emacs should be in the business of translating low-level
touch events into meaningful higher-level ones (especially if that
means having to be in the `input` group). This seems to be a hack that
can work now but is inconvenient and will have to be replaced by
something else in the foreseeable future.
So I'd rather we concentrate on an approach that has a chance to work
without special privilege, leverages other people's code to extract
high-level events from the low-level ones, and doesn't come with
a predictable death-date. Even if that means it's something that
currently only works if you install the right combination of bleeding
edge software.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: libinput support in Eamcs?
2018-08-06 15:44 ` Stefan Monnier
@ 2018-08-06 15:51 ` Lars Ingebrigtsen
0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2018-08-06 15:51 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> I don't think Emacs should be in the business of translating low-level
> touch events into meaningful higher-level ones (especially if that
> means having to be in the `input` group). This seems to be a hack that
> can work now but is inconvenient and will have to be replaced by
> something else in the foreseeable future.
Yeah, I agree.
If only the Linux people could get their acts together in this area and
propagate touch events properly to applications...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: libinput support in Eamcs?
2018-08-06 14:55 libinput support in Eamcs? Lars Ingebrigtsen
2018-08-06 15:44 ` Stefan Monnier
@ 2018-08-06 21:28 ` Alan Third
2018-08-06 22:22 ` Philipp Stephani
2018-08-07 0:33 ` Richard Stallman
2 siblings, 1 reply; 6+ messages in thread
From: Alan Third @ 2018-08-06 21:28 UTC (permalink / raw)
To: emacs-devel
On Mon, Aug 06, 2018 at 04:55:45PM +0200, Lars Ingebrigtsen wrote:
> But apparently, Linux is moving away from the older input libraries
> (synaptics for touchpad and libev for general events) and to libinput,
> both on X and Wayland. From what I understand, it's deemed to be The
> Future.
>
> (Please correct me if I misunderstand.)
That is my understanding too.
> And this is really low-level, so we'd have to write higher-level
> function to translate this all to sensible events.
This is what really put me off trying to use libinput2 directly. I
thought the best option is to use GTK, which might need to be a native
port to GTK, as Emacs currently ignores GTK’s event handling
completely.
That clearly doesn’t help with other X toolkits, but I believe it
would provide us with a similar set of basic touch events on X,
Wayland, macOS and (I think) Windows.
Although writing a GTK port just for touch events seems a little
excessive.
--
Alan Third
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: libinput support in Eamcs?
2018-08-06 21:28 ` Alan Third
@ 2018-08-06 22:22 ` Philipp Stephani
0 siblings, 0 replies; 6+ messages in thread
From: Philipp Stephani @ 2018-08-06 22:22 UTC (permalink / raw)
To: Alan Third; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 367 bytes --]
Alan Third <alan@idiocy.org> schrieb am Mo., 6. Aug. 2018 um 23:29 Uhr:
>
>
> Although writing a GTK port just for touch events seems a little
> excessive.
>
Writing a GTK port would have many other advantages, for example not
breaking in upcoming GTK versions due to the use of deprecated functions,
native support for non-X environments, a cleaner codebase, etc.
[-- Attachment #2: Type: text/html, Size: 649 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: libinput support in Eamcs?
2018-08-06 14:55 libinput support in Eamcs? Lars Ingebrigtsen
2018-08-06 15:44 ` Stefan Monnier
2018-08-06 21:28 ` Alan Third
@ 2018-08-07 0:33 ` Richard Stallman
2 siblings, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2018-08-07 0:33 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> But apparently, Linux is moving away from the older input libraries
> (synaptics for touchpad and libev for general events) and to libinput,
> both on X and Wayland. From what I understand, it's deemed to be The
> Future.
I don't think change has much to do with Linux. Linux is the kernel;
none of these libraries is part of Linux.
--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-08-07 0:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-06 14:55 libinput support in Eamcs? Lars Ingebrigtsen
2018-08-06 15:44 ` Stefan Monnier
2018-08-06 15:51 ` Lars Ingebrigtsen
2018-08-06 21:28 ` Alan Third
2018-08-06 22:22 ` Philipp Stephani
2018-08-07 0:33 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.