Commit graph

18 commits

Author SHA1 Message Date
José Expósito
b566d64c17 quirks: Add Apple Magic Trackpad v2 USB-C (2024)
Add the missing USB-C vendor ID.

Closes: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1080
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1134>
2025-02-04 14:36:01 +01:00
José Expósito
3f4abaf77e quirks: Add Apple Magic Trackpad v2 2024
Add similar quirks to the previous generations.

Closes: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1080
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1131>
2025-01-29 09:32:30 +01:00
Yogas Kung
ed9570df60 quirks: increase MacBook touchpad AttrPalmSizeThreshold 2024-04-24 04:11:51 +00:00
Peter Hutterer
bf061ad157 quirks: Add a the onebutton apple touchpad quirk for an old MacBook
This is a 2006 Macbook, model A1181. Should fix the warning:
  event9  - appletouch: kernel bug: missing right button, assuming it is a clickpad.

Related #981

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/983>
2024-03-13 11:52:00 +00:00
Peter Hutterer
f276f3de54 quirks: change all 3-digit matches to zero-prefixed 4-digit matches
Time to get some standardization here!

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-03-20 17:38:28 +00:00
Peter Hutterer
28a246188d quirks: fix duplicate section names
Our parser doesn't care about this, but let's stick to the proper format so
we can read those files with e.g. Python's ConfigParser

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-03-20 17:38:28 +00:00
Cyril LEVIS
32c9bdcccc fix: add apple m2 keyboard quirks
this fix dwt https://github.com/AsahiLinux/linux/issues/103

Signed-off-by: Cyril Levis <git@levis.name>
2023-01-23 18:23:13 +00:00
Peter Hutterer
a7e4cbc212 quirks: allow overriding of AttrEventCode and AttrInputProp
This switches the quirk from AttrEventCodeEnable/Disable to just
AttrEventCode with a +/- prefix for each entry.
This switches the quirk from AttrInputPropEnable/Disable to just
AttrInputProp with a +/- prefix for each entry.

Previously, both event codes and input props would only apply the
last-matching section entry for a device. Furthermore, an earlier Disable entry
would take precedence over a later Enable entry. For example, a set of
sections with these lines *should* enable left, right and middle:

  [first]
  AttrEventCodeEnable=BTN_LEFT;BTN_RIGHT;BTN_MIDDLE

  [second]
  AttrEventCodeDisable=BTN_RIGHT

  [third]
  AttrEventCodeEnable=BTN_LEFT;BTN_RIGHT;

Alas: the first line was effectively ignored (quirks only returned the
last-matching one, i.e. the one from "third"). And due to implementation
details in evdev.c, the Disable attribute was processed after Enable,
i.e. the device was enabled for left + right and then disabled for
right. As a result, the device only had BTN_LEFT enabled.

Fix this by changing the attribute to carry both enable/disable
information and merging the commands together.

Internally, all quirks matching a device are simply ref'd into an array
in the struct quirks. The applied value is simply the last entry in the
array corresponding to our quirk.

For AttrEventCode and AttrInputProp instead do this:
- switch them to a tuple with the code as first entry and a boolean
  enable/disable as second entry
- if the struct quirk already has an entry for either, append the more
  recent one to the existing entry (instead of creating a new entry in
  the array). This way we have all entries that match and in-order of
  precedence - i.e. we can process them left-to-right to end up
  with the right state.

Fixes: https://gitlab.freedesktop.org/libinput/libinput/-/issues/821

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-28 08:25:41 +10:00
Hector Martin
c2b420c793 quirks: Add Apple MTP touchpad quirk
Apple M2 (and presumably newer) laptops now embed the touchpad
controller into the main SoC, and use a new internal communications
protocol between it and the main CPU. This isn't really a "bus" like
SPI or I2C, so the downstream kernel driver currently uses the (not
well supported) HOST bus type. MatchBus can't match on that, so let's
just use a name match (plus the vendor ID, which is still valid and
the usual Apple one).

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-11-22 23:48:01 +00:00
Greg V
d8b1a773e3 quirks: add quirks for Apple SPI input devices
The Linux applespi driver currently uses the Synaptics vendor ID
on the trackpad for some reason (even though, at least from bcm5974
we only know that Broadcom is involved..) but my upcoming FreeBSD driver
uses the Apple vendor ID everywhere, so add two quirks.

Signed-off-by: Greg V <greg@unrelenting.technology>
2021-03-17 02:34:30 +00:00
Davide Depau
ec939611fd quirks: fix force-press on Apple Magic Trackpad 2
The current defaults detect force presses as palm or thumb.
The values provided here work for a 99% accurate palm/thumb detection
and provide close zero false positives in my tests.

Signed-off-by: Davide Depau <davide@depau.eu>
2020-10-05 20:57:05 +00:00
Yariv Barkan
84b3b1731a quirks: fix Apple external trackpad v2 thresholds
The external Apple "Magic" trackpads, both the first and the second
generations, have pretty good built-in spurious touch filtering. For
these device models libinput's own filtering is not required. Using low
enough values such as 20:10 effectively disables libinput's filtering.

Signed-off-by: Yariv Barkan <oigevald+libinput@gmail.com>
2020-06-17 09:46:59 +03:00
Sebastian Krzyszkowiak
a99793f256 quirks: add a new Apple vendor ID for Bluetooth devices
Also, set a default AttrTouchSizeRange for Apple touchpads via Bluetooth
to match the one from the USB rule.

Signed-off-by: Sebastian Krzyszkowiak <dos@dosowisko.net>
2019-04-14 05:51:46 +00:00
Thomas Profitt
ad50a94789 quirks: Adjust MacBookPro11,2 touchpad PalmSize
The touchpad is 104mmx75mm, but an AttrPalmSizeThreshold of 800 is too
  aggressive, and even relatively-small fingers and thumbs register as
  palms sporadically, stopping the mouse until you lift your hand and try again.

1600 was chosen because it's the point at which my fingers and thumbs,
  held at a very low angle, stop registering as palms, so it should
  acommodate bigger fingers.

I don't know if the [Apple Touchpads USB] default of 800 needs to be
  updated too, or if it's a quirk of this particular touchpad.
2018-11-27 16:14:07 -06:00
Peter Hutterer
4286dcd1de quirks: switch a few model quirks over to use the new evcode disabling
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-29 04:16:38 +00:00
Matt Mayfield
27c42990d8 touchpad: fine tune size-based thumb detection
In testing on an Apple Magic Trackpad, thumb touches are reliably
detected by being quite large in the major dimension, but around
half the size in the minor dimension.
2018-08-29 16:35:22 -05:00
Peter Hutterer
66ac659e36 touchpad: add support for size-based thumb detection
Fixes #97

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-08-29 16:35:14 -05:00
Peter Hutterer
e6cad92005 Rename data/ to quirks/
A better, less ambiguous name than just "datadir"

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-13 13:30:54 +10:00
Renamed from data/50-system-apple.quirks (Browse further)