*/
bustype = libevdev_get_id_bustype(device->evdev);
if (bustype == BUS_USB) {
- if (libevdev_get_id_vendor(device->evdev) == VENDOR_ID_APPLE)
+ if (device->model == EVDEV_MODEL_APPLE_TOUCHPAD)
device->tags |= EVDEV_TAG_INTERNAL_TOUCHPAD;
} else if (bustype != BUS_BLUETOOTH)
device->tags |= EVDEV_TAG_INTERNAL_TOUCHPAD;
* Apple touchpads are always big enough to warrant palm detection */
if (vendor_id == VENDOR_ID_WACOM) {
return 0;
- } else if (vendor_id != VENDOR_ID_APPLE) {
+ } else if (device->model != EVDEV_MODEL_APPLE_TOUCHPAD) {
/* We don't know how big the touchpad is */
if (device->abs.absinfo_x->resolution == 1)
return 0;
{ "LIBINPUT_MODEL_SYSTEM76_GALAGO", EVDEV_MODEL_SYSTEM76_GALAGO },
{ "LIBINPUT_MODEL_SYSTEM76_KUDU", EVDEV_MODEL_SYSTEM76_KUDU },
{ "LIBINPUT_MODEL_CLEVO_W740SU", EVDEV_MODEL_CLEVO_W740SU },
+ { "LIBINPUT_MODEL_APPLE_TOUCHPAD", EVDEV_MODEL_APPLE_TOUCHPAD },
{ NULL, EVDEV_MODEL_DEFAULT },
};
const struct model_map *m = model_map;
EVDEV_MODEL_SYSTEM76_GALAGO,
EVDEV_MODEL_SYSTEM76_KUDU,
EVDEV_MODEL_CLEVO_W740SU,
+ EVDEV_MODEL_APPLE_TOUCHPAD,
};
struct mt_slot {
# Sort by brand, model
##########################################
+# Apple
+##########################################
+libinput:touchpad:input:b0003v05ACp*
+libinput:touchpad:input:b0005v05ACp*
+ LIBINPUT_MODEL_APPLE_TOUCHPAD=1
+
+##########################################
# Google
##########################################
# hwdb matches:
#
-# libinput:<modalias>
-IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:", \
+# libinput:touchpad:<modalias>
+ENV{ID_INPUT_TOUCHPAD}=="1", \
+ IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:touchpad:", \
GOTO="libinput_model_quirks_end"
# libinput:name:<name>:dmi:<dmi string>
IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:$attr{[dmi/id]modalias}'", \
GOTO="libinput_model_quirks_end"
+
LABEL="libinput_model_quirks_end"