touchpad: Add clickpad-style software buttons
Almost all non Apple touchpads have visible markings for software button areas,
so limit clickfinger behavior to Apple clickpads, and implement software button
areas for others.
This is a slightly fancier implementation than the simplest model and ported
over from libtouchpad. It implements a state machine for the software buttons
with left and right buttons currently implemented. Buttons are oriented
left-to-right, in a horizontal bar. No random button placement allowed.
In general, the procedure is:
- if a finger sets down in the left button area, a click is a left click
- if a finger sets down in the right button area, a click is a right click
- if a finger leaves the button area, a click is a left click
- if a finger starts outside the button area, a click is a left click
Two timeouts are used to handle buttons more smoothly:
- if a finger sets down in a button area but "immediately" moves over
to a different area, that area takes effect on a click.
- if a finger leaves a button area and "immediately" clicks or moves back into
the area, the button still takes effect on a click.
- if a finger changes between areas and stays there for a timeout, that area
takes effect on a click.
Note the button area states are named BOTTOM_foo to make it easier to later
add support for a top button area such as can be found on the Thinkpad [2-5]40
series.
Co-authored-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-28 09:44:11 +10:00
|
|
|
EXTRA_DIST = touchpad-tap-state-machine.svg touchpad-softbutton-state-machine.svg
|
2014-03-28 15:51:08 +10:00
|
|
|
|
2013-12-06 09:58:00 +10:00
|
|
|
if HAVE_DOXYGEN
|
|
|
|
|
|
|
|
|
|
noinst_DATA = html/index.html
|
|
|
|
|
|
|
|
|
|
header_files = \
|
|
|
|
|
$(top_srcdir)/src/libinput.h
|
|
|
|
|
|
|
|
|
|
html/index.html: libinput.doxygen $(header_files)
|
|
|
|
|
$(AM_V_GEN)$(DOXYGEN) $<
|
|
|
|
|
|
|
|
|
|
clean-local:
|
|
|
|
|
$(AM_V_at)rm -rf html
|
|
|
|
|
|
|
|
|
|
doc_src= $(shell find html -type f -printf "html/%P\n" 2>/dev/null)
|
2014-03-28 15:51:08 +10:00
|
|
|
EXTRA_DIST += $(builddir)/html/index.html $(doc_src)
|
2013-12-06 09:58:00 +10:00
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# make sure doc was built before running dist
|
|
|
|
|
dist-hook:
|
|
|
|
|
@test -f $(distdir)/html/index.html || (\
|
|
|
|
|
echo "******************************************************" && \
|
|
|
|
|
echo "Couldn't find documentation files, refusing make dist." && \
|
|
|
|
|
echo "Install doxygen to build documentation for tarball." && \
|
|
|
|
|
echo "******************************************************" && \
|
|
|
|
|
test )
|