quirks: replace ModelPressurepad with setting INPUT_PROP_PRESSUREPAD

This is the more generic approach and doesn't require us to have any
specific implementation in libinput itself.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1374>
This commit is contained in:
Peter Hutterer 2025-12-04 14:40:40 +10:00 committed by Marge Bot
parent 1b4dbb9087
commit bde6d07d57
10 changed files with 38 additions and 30 deletions

View file

@ -148,6 +148,9 @@ ModelBouncingKeys
ModelSynapticsSerialTouchpad
Reserved for touchpads made by Synaptics on the serial bus
ModelPressurePad
.. warning:: This quirk is no longer in use. Use
``AttrInputProp=+INPUT_PROP_PRESSUREPAD`` instead.
Unlike in traditional touchpads, whose pressure value equals contact size,
on pressure pads pressure is a real physical axis.
Indicates that the device is a pressure pad.
@ -199,6 +202,9 @@ AttrInputProp=+INPUT_PROP_BUTTONPAD;-INPUT_PROP_POINTER;
Enables or disables the evdev input property on the device. The prefix
for each entry is either '+' (enable) or '-' (disable). Entries may be
a named input property or the hexadecimal value of that property.
The most common use of this is ``AttrInputProp=+INPUT_PROP_PRESSUREPAD``
which marks a touchpad as a :ref:`forcepad or pressurepad <touchpads_buttons_forcepads>`.
AttrPointingStickIntegration=internal|external
Indicates the integration of the pointing stick. This is a string enum.
Only needed for external pointing sticks. These are rare.

View file

@ -136,13 +136,13 @@ ModelTabletModeNoSuspend=1
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x0F60
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell Mayabay Touchpad]
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCFA0
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell Precision 5480]
MatchBus=i2c
@ -156,58 +156,58 @@ ModelTouchpadVisibleMarker=0
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCFF8
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 16 Synaptics touchpad]
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCFF9
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 14 Goodix touchpad]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x0F61
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 16 Goodix touchpad]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x0F62
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell 14 Premium DA14250 touchpad]
MatchBus=i2c
MatchVendor=0x0488
MatchProduct=0x108C
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell 16 Premium DA16250 touchpad]
MatchBus=i2c
MatchVendor=0x0488
MatchProduct=0x108D
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 14_1 Synaptics touchpad]
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xD01D
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 16_1 Synaptics touchpad]
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xD01A
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 14 Sensel touchpad]
MatchBus=i2c
MatchVendor=0x2C2F
MatchProduct=0x0034
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 16 Sensel touchpad]
MatchBus=i2c
MatchVendor=0x2C2F
MatchProduct=0x0033
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD

View file

@ -1,8 +1,8 @@
# Clickpad that announces BTN_RIGHT
# requires ModelPressurePad=1
# requires AttrInputProp=+INPUT_PROP_PRESSUREPAD
[HONOR MagicBook Art 14]
MatchName=*TOPS0102*
MatchDMIModalias=dmi:*svnHONOR:*pnMRA-XXX*
MatchUdevType=touchpad
AttrEventCode=-BTN_RIGHT
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD

View file

@ -97,7 +97,7 @@ AttrKeyboardIntegration=external
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCFD2
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# The HP OmniBook Ultra Flip Laptop 14-fh0xxx's custom Intel ISH firmware
# filters out events from its builtin keyboard and touchpad when the hinge is

View file

@ -12,10 +12,10 @@ MatchUdevType=touchpad
MatchDMIModalias=dmi:*svnHUAWEI:*pnMRGF-XX*
AttrEventCode=-BTN_RIGHT
# 2024 model requires ModelPressurePad=1
# 2024 model requires AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Huawei MateBook X Pro 2024 Touchpad]
MatchName=GXTP7863:00 27C6:01E0 Touchpad
MatchUdevType=touchpad
MatchDMIModalias=dmi:*svnHUAWEI:*pnVGHH-XX*
AttrEventCode=-BTN_RIGHT
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD

View file

@ -162,7 +162,7 @@ AttrTrackpointMultiplier=1.25
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCE37
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Lenovo Yoga C930 Tablet]
MatchBus=i2c
@ -317,7 +317,7 @@ AttrKeyboardIntegration=internal
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x01E8
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# Duet 7i tablet switch activated by folding keyboard cover, or removing it.
# We must not disable volume rocker 'keyboard'.
@ -394,14 +394,14 @@ AttrKeyboardIntegration=internal
MatchName=*GXTP5100*
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G7+ASP*:*
MatchUdevType=touchpad
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# The ThinkBook 14/16 G6+ IMH also has a similar issue as the G7+ mentioned above.
[Lenovo ThinkBook G6+ IMH]
MatchName=*GXTP5100*
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G6+IMH*:*
MatchUdevType=touchpad
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# Lenovo Yoga Slim 7i Carbon sends bogus ABS_MT_TOOL_TYPE MT_TOOL_PALM events
[Lenovo Yoga Slim 7i Carbon]
@ -415,11 +415,11 @@ AttrEventCode=-ABS_MT_TOOL_TYPE
MatchName=*GXTP5100*
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX9-15Gen1*:*
MatchUdevType=touchpad
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# The ThinkBook 14/16 G7+ IAH also has a similar issue as the ASP mentioned above.
[Lenovo ThinkBook G7+ IAH touchpad]
MatchName=*GXTP5100*
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G7+IAH*:*
MatchUdevType=touchpad
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD

View file

@ -3673,8 +3673,7 @@ tp_init_pressurepad(struct tp_dispatch *tp, struct evdev_device *device)
* See also #562
*/
if (libevdev_has_property(device->evdev, INPUT_PROP_PRESSUREPAD) ||
libevdev_get_abs_resolution(device->evdev, ABS_MT_PRESSURE) != 0 ||
evdev_device_has_model_quirk(device, QUIRK_MODEL_PRESSURE_PAD)) {
libevdev_get_abs_resolution(device->evdev, ABS_MT_PRESSURE) != 0) {
libevdev_disable_event_code(device->evdev, EV_ABS, ABS_MT_PRESSURE);
libevdev_disable_event_code(device->evdev, EV_ABS, ABS_PRESSURE);
}

View file

@ -296,8 +296,6 @@ quirk_get_name(enum quirk q)
return "ModelTrackball";
case QUIRK_MODEL_WACOM_TOUCHPAD:
return "ModelWacomTouchpad";
case QUIRK_MODEL_PRESSURE_PAD:
return "ModelPressurePad";
case QUIRK_ATTR_SIZE_HINT:
return "AttrSizeHint";

View file

@ -83,7 +83,6 @@ enum quirk {
QUIRK_MODEL_LENOVO_T450_TOUCHPAD,
QUIRK_MODEL_LENOVO_X1GEN6_TOUCHPAD,
QUIRK_MODEL_LENOVO_X230,
QUIRK_MODEL_PRESSURE_PAD,
QUIRK_MODEL_SCROLL_ON_MIDDLE_CLICK,
QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD,
QUIRK_MODEL_SYSTEM76_BONOBO,

View file

@ -471,8 +471,14 @@ parse_input_prop_property(const char *prop,
goto out;
} else {
int val = libevdev_property_from_name(s);
if (val == -1)
goto out;
if (val == -1) {
/* Remove once we require libevdev 1.13.6 */
if (streq(s, "INPUT_PROP_PRESSUREPAD")) {
val = INPUT_PROP_PRESSUREPAD;
} else {
goto out;
}
}
prop = (unsigned int)val;
}
props[idx].prop = prop;