[Top][All Lists]

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

Re: Touch events

From: Anders Lindgren
Subject: Re: Touch events
Date: Mon, 26 Jun 2017 12:08:12 +0200


This looks great, I just can't wait to start using it! I can imagine a number of uses for it already -- I would like to bind zoom and pinch to show and hide documentation.

Anyway, the "mac" port, maintained by YAMAMOTO Mitsuharu have had support for this for some time. It uses the names `swipe-left/right/up/down', `magnify-up/down', and `rotate-left/right' -- I guess it would be a good idea for us to use the same names and conventions, to avoid confusing users.

    -- Anders

On Sat, Jun 24, 2017 at 10:53 AM, Alan Third <address@hidden> wrote:
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

reply via email to

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