summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2016-05-17evdev: the range between dpad and trigger-happy are keys, not buttonsPeter Hutterer1-1/+5
Affected keys: KEY_ALS_TOGGLE KEY_BUTTONCONFIG KEY_TASKMANAGER KEY_JOURNAL KEY_CONTROLPANEL KEY_APPSELECT KEY_SCREENSAVER KEY_VOICECOMMAND KEY_BRIGHTNESS_MIN KEY_BRIGHTNESS_MAX KEY_KBDINPUTASSIST_PREV KEY_KBDINPUTASSIST_NEXT KEY_KBDINPUTASSIST_PREVGROUP KEY_KBDINPUTASSIST_NEXTGROUP KEY_KBDINPUTASSIST_ACCEPT KEY_KBDINPUTASSIST_CANCEL https://bugs.freedesktop.org/show_bug.cgi?id=95295 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-16Merge branch 'wip/trackball-rotation'Peter Hutterer7-19/+274
2016-05-16Add support for relative device rotation (trackball only)Peter Hutterer7-0/+250
Trackballs are effectively stationary devices and can be positioned at any rotation. They are also employed by users with impaired dexterity which sometimes implies that they are positioned at an non-default angle to make the buttons easier to reach. Add a config option for rotation for trackball devices. Currently only supported for 90-degree angles, if there is a need we can add more angles later. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-16gestures: don't send swipe gestures when gestures are disabledPeter Hutterer1-1/+1
Introduced in 6ad303b as part of an code flow optimization, causing any 3+ finger gesture to be posted as swipe gesture, even when gestures are disabled. However, the event is filtered in the higher levels with a bug message printed to the log. Don't post swipe gestures for devices where gestures are disabled. https://bugs.freedesktop.org/show_bug.cgi?id=95314 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-03Add tagging of trackballsPeter Hutterer2-0/+2
Currently unused, but oh, the possibilities... The only thing we have to go on for trackballs at the moment is whether they have "Trackball" in the name string. All others need to be manually tagged. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-03evdev: de-duplicate the model property->model flag listPeter Hutterer1-19/+22
Rather than a list where the only difference is the LIBINPUT_MODEL vs EVDEV_MODEL prefix, use a macro. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-03evdev: log the applied model flags in debug modePeter Hutterer1-1/+6
Makes it a lot easier to figure out if the udev properties are set up correctly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-03Constify two matrix multiplication helpersPeter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-03doc: add an overview of the various configuration optionsPeter Hutterer1-0/+26
It's a bit hard to find what can be configured in the wall of text that is the doxygen output. Add a TOC of the various options so it's easy to get a quick grasp. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-03doc: add missing @ingroup tag to the accel profile enumPeter Hutterer1-0/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-28touchpad: detect and warn about kernel tracking pointer jumpsPeter Hutterer1-0/+27
If a touch moves by more than 20mm within a single frame, reset the motion history, effectively discarding the movement. This is a relatively common bug and almost always needs a kernel fix, so add an explanatory page to the docs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-28Make a link to the html docs available as a #definePeter Hutterer1-0/+8
The "latest" documentation link is the location for the master branch, released versions have their own directory on the server. The micro-versions of 90 and above are used for snapshots and release candidates, so whenever we have a micro version of >= 90 we still want to link to the "latest" documentation. In all other cases, we link to the current release. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-28tablet: fix distance normalization range after 25a9f39Peter Hutterer1-3/+12
25a9f39 changed the range to [-1, 1] but that's incorrect for the distance values. Split the normalization up into two functions and make sure our distance range is correct. https://bugs.freedesktop.org/show_bug.cgi?id=95074 And while we're at it, sneak in a test for pressure ranges too. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
2016-04-22touchpad: exclude Logitech touchpads from disable-while-typingPeter Hutterer2-0/+5
Logitech does not sell internal touchpads, the closest ones are the TK820 and the K400 series devices. Neither of which need DWT, the touchpad is next to the keyboard. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-21Fix distcheckPeter Hutterer1-0/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-18Merge branch 'wip/tablet-pad-support'Peter Hutterer10-50/+1380
2016-04-18fixup! Add the LIBINPUT_DEVICE_CAP_TABLET_PAD capability and matching interfacePeter Hutterer1-1/+0
2016-04-18pad: implement wacom pad supportPeter Hutterer6-15/+722
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-04-18Add the LIBINPUT_DEVICE_CAP_TABLET_PAD capability and matching interfacePeter Hutterer4-1/+606
This interface handles the buttons on the physical tablet itself, including the touch ring and the strip. A notable difference to other libinput interfaces here is that we do not use linux/input.h event codes for buttons. Instead, the buttons are merely numbered sequentially, starting at button 1. This means: * the API is different, instead of get_button() we have get_button_number() to drive the point home * there is no seat button count. pads are inherently different devices and compositors should treat them as such. The seat button count makes sense when you want to know how many devices have BTN_LEFT down, but it makes no sense for buttons where all the semantics are handled by the compositor anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-04-18tablet: move the libwacom check for left-handed-ness into a helper functionPeter Hutterer3-37/+56
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-04-18evdev: always defuzz absolute touchscreensPeter Hutterer2-0/+37
If a touchscreen has a fuzz value use it for motion hysteresis similar to how we do it for a touchpad. This stops pointer wobbles as seen in https://bugs.freedesktop.org/show_bug.cgi?id=94918 It's up to the system to override or set the kernel's fuzz value correctly, i.e. a udev hwdb entry is required where the kernel driver does not set it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-04-18evdev: use a slot variable instead of dereferencing everywherePeter Hutterer1-7/+10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-04-18evdev: rename slot to slot_idxPeter Hutterer1-12/+12
No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-04-18evdev: move the hysteresis code to a more generic locationPeter Hutterer2-19/+19
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-04-15touchpad: add LIBINPUT_MODEL_WOBBLY_TOUCHPAD for the HP 14-ac157tuPeter Hutterer3-0/+5
If some elantech touchpads require a hysteresis, let's use some more generic tag for those touchpads that require correct handling of pointer wobbles. https://bugs.freedesktop.org/show_bug.cgi?id=94897 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-15touchpad: enlarge top button area by a factor 3 instead of 1.5Peter Frühberger1-1/+1
When the touchpad is disabled, the top software button on the Lenovo T440 series touchpads currently enlarge by a factor of 1.5 (to 15mm). This is not enough, a user has to rotate the wrist quite uncomfortable when using the left mouse button. When the touchpad itself is off anyway we can extend the size of the top software buttons to the factor 3, i.e. 30mm. Signed-off-by: Peter Frühberger <peter.fruehberger@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-14evdev: enable middle-button scrolling on middle-button emulationPeter Hutterer2-50/+63
https://bugs.freedesktop.org/show_bug.cgi?id=94856 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-14evdev: split scroll button state check outPeter Hutterer2-1/+4
Rather than checking the physical key's state, set a flag for the button to be down. This enables us to use non-physical buttons (middle button emulation). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-14evdev: if we have a quick scroll button release, skip middle button emulationPeter Hutterer1-2/+2
The only difference between evdev_pointer_notify_physical_button() and evdev_pointer_notify_button() is that the former filters out middle button emulations where applicable. Doing so effectively disables using a button for scrolling that is also used for middle button emulation. This is intentional, it is a niche use-case (and prone to timer races). OTOH some devices exist that only have two buttons on the pointing stick and require button scrolling. This use-case is given preference. https://bugs.freedesktop.org/show_bug.cgi?id=94856 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-14test: add test for no scroll events before the scroll button timeoutPeter Hutterer1-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-13tablet: add a fuzz-filter to avoid spamming callers with subpixel updatesPeter Hutterer2-0/+37
This is especially a problem for the cursor tool which can be legitimately left on the tablet. It wobbles by a couple of device units, resulting in continuous axis updates to the caller. Pre-filter any of these events by the axis' fuzz value so we don't even process them. For ABS_DISTANCE which doesn't have a fuzz we hard-code a minimum fuzz of 2. This should eventually land in the kernel though. https://bugs.freedesktop.org/show_bug.cgi?id=94892 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
2016-04-12tablet: fix the airbrush slider rangePeter Hutterer1-1/+1
Supposed to be [-1, 1] but we only generated [0, 1] Reported-by: Carlos Garnacho <carlosg@gnome.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Carlos Garnacho <carlosg@gnome.org>
2016-04-11timer: print the wrong offset when we have a negative timer offset bugPeter Hutterer1-1/+2
Makes it easier to determine if this is a libinput bug or something triggered by the caller waiting too long to call libinput_dispatch(). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-11libinput: Actually return the default accel profileJonas Ådahl1-1/+1
We just returned the current profile instead of the default one. Fix that. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-06Fix spelling mistakesEric Engestrom4-7/+7
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-06Merge branch 'wip/touchpad-middle-button'Peter Hutterer2-1/+32
2016-04-05touchpad: add a middle button software areaPeter Hutterer2-1/+32
Middle button interaction is most commonly to paste and it is a single-event interaction (button press). We provided middle button in software button mode by emulating it with a two-finger press with L+R down at the same time. This is also what many touchpads are spectacularly bad at, it is very common to detect the physical button down event before the second finger registers, resulting in left or right clicks where a middle button should be triggered. Unless the fingers are resting on the touchpad for at least one scanout, the success rate for middle button emulation is only at 70% or so. This patch adds a 25%-width middle button area between the left and the right software button, everything else stays the same. To avoid immediate breakage, the middle button emulation remains but may be removed in the future. The doc is updated to only refer to the middle button area now. https://bugs.freedesktop.org/show_bug.cgi?id=94755 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-04Merge branch 'wip/t450-jumping-cursor-fixes'Peter Hutterer3-5/+8
2016-04-01touchpad: fix left-handed top software trackpoint buttonsPeter Hutterer1-7/+16
The previous code would swap the top software buttons depending on the touchpad's left-handed setting, not the trackpoint setting. Changing both devices to left-handed resulted in a double-swap, i.e. the trackpoint was always right-handed. https://bugs.freedesktop.org/show_bug.cgi?id=94733 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-03-30touchpad: reset the motion history on significant negative pressure changesPeter Hutterer2-0/+5
Resetting the motion history has the side-effect of swallowing movements, we don't calculate deltas until we have 4 motion events. During a finger release, we're likely to get a large pressure change between two events, resetting the motion history prevents the cursor from jumping on release. The value of 7 found by trial-and-error, tested on the T440 and T450 hardware. The absolute value is highly variable but recordings show that the pressure changes only by 1 or 2 units during normal interaction. Higher pressure changes are during finger position changes but since those should not cause a jump anyway, we tend to win there too. Currently only enabled for negative pressure changes, let's see how we go with that. https://bugs.freedesktop.org/show_bug.cgi?id=94379 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-03-29touchpad: only post motion events if we have motionPeter Hutterer2-5/+3
Because our delta calculation factors in previous events on touchpads (to reduce jitter) we may get a nonzero delta if we have an event that doesn't actually change x or y. Drop the t->dirty workaround introduced in a608d9d, an event that virtually disappears can mess up our state machines. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-03-29Fix two doxygen groupingsPeter Hutterer1-1/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-17touchpad: drop unused parameterPeter Hutterer1-2/+2
Left over from an earlier version of the t450 quirk (see a608d9dc2c70) and unused in the merged version. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11touchpad: add quirk for the T450 and T460 generation hardwarePeter Hutterer4-4/+42
The touchpad's sensors are too far apart (or the firmware interferes), causing in a jerky movement visible especially on slow motion. We get a bunch of normal motion events, then only ABS_MT_PRESSURE updates without x/y updates. After about one mm of movement x/y updates resume, with the first event covering the distance between the last motion event. That event is usually accelerated and thus causes a large jump. Subsequent events are sufficiently fine-grained again. This patch counts the number of non-motion events. Once we hit 10 in a row, we mark the first motion update as non-dirty, effectively discarding the motion and thus stopping the pointer jumps. https://bugs.freedesktop.org/show_bug.cgi?id=94379 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-03-07tablet: reject mislabelled tablet devicesPeter Hutterer1-0/+28
The HUION 580 has a "consumer control" event node that has an ABS_VOLUME, keys and a REL_HWHEEL. It has the same VID/PID as the pen tablet and libwacom labels it as ID_INPUT_TABLET. This causes a crash later when we try to init pointer acceleration for a device that doesn't have axes. https://bugzilla.redhat.com/show_bug.cgi?id=1314955 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-07Assert that the interface is actually filled in.Peter Hutterer1-0/+3
Had this in a private bug report recently. Missing hooks for open/close just segfault with little information to debug. Add an assert, this is definitely a bug in the caller and we don't need to recover from that. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-02touchpad: use the udev property over a compile-time vendor ID checkPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-01tablet: sanitize button mask passingPeter Hutterer2-34/+22
We have a struct, use it. Better than passing arrays and array lengths around. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-28touchpad: only trigger immediate pinch detection for three fingersPeter Hutterer1-0/+1
If the fingers are vertically apart by more than 20mm we used to assume a pinch gesture immediately. This is too close together for some users during two-finger scrolling. Since we should always bias towards scrolling, only trigger this detection for three fingers, the rest has to go through the movement detection. The reason for the pinch detection here was to differentiate from 3fg swipe gestures (83f3dbd1), hence we're still in spirit of that patch. https://bugs.freedesktop.org/show_bug.cgi?id=94264 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-02-23tablet: use the tilt resolution if we have itPeter Hutterer1-9/+18
A nonzero resolution on the tilt axes is units/rad so we can calculate the physical min/max based. Uneven min/max ranges are supported. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>