emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Touch events


From: Alan Third
Subject: Touch events
Date: Sat, 24 Jun 2017 09:53:35 +0100
User-agent: Mutt/1.7.2 (2016-11-26)

I’ve created a small patch that adds some touch event handling to
Emacs. Currently it only works on macOS, but the same functionality is
available on GTK3, MS Windows and vanilla Xorg.

I wanted to know if I’m going about this the right way, or if it’s
even worth my while continuing.

I’ve created a number of new events: touch-scroll, touch-pinch, etc.,
that can be bound to functions. I’ve attached a simple script that
binds touch-pinch to the text-scale-increase/decrease functions.

BTW, how do you create a lisp float from C? I tried something like

    Lisp_Object delta;
    XSETFLOAT (delta, [event magnification]);

but it just complains that [event magnification] returns a double and
not void *.

NOTE: If you install this patch, scrolling with the touchpad will no
longer work on macOS (a real mousewheel will be fine, though). It
needs some effort to get it working, and my elisp skills aren’t up to
much. It either needs a compatibility function in lisp, or a way to
disable it and use the existing mousewheel code. It could be worth
trying to tie it into the new pixel scroll mode.
-- 
Alan Third

Attachment: tp.el
Description: Test functions

Attachment: 0001-Add-touch-events.patch
Description: Text document


reply via email to

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