[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libinput support in Eamcs?
From: |
Lars Ingebrigtsen |
Subject: |
libinput support in Eamcs? |
Date: |
Mon, 06 Aug 2018 16:55:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
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
- libinput support in Eamcs?,
Lars Ingebrigtsen <=