diff --git a/doc/user/device-quirks.rst b/doc/user/device-quirks.rst index 107e0774..dc3b46e2 100644 --- a/doc/user/device-quirks.rst +++ b/doc/user/device-quirks.rst @@ -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 `. AttrPointingStickIntegration=internal|external Indicates the integration of the pointing stick. This is a string enum. Only needed for external pointing sticks. These are rare. diff --git a/quirks/50-system-dell.quirks b/quirks/50-system-dell.quirks index d52c3672..52d66734 100644 --- a/quirks/50-system-dell.quirks +++ b/quirks/50-system-dell.quirks @@ -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 diff --git a/quirks/50-system-honor.quirks b/quirks/50-system-honor.quirks index 4f5e8023..28b94d9c 100644 --- a/quirks/50-system-honor.quirks +++ b/quirks/50-system-honor.quirks @@ -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 diff --git a/quirks/50-system-hp.quirks b/quirks/50-system-hp.quirks index 4217df38..9b893340 100644 --- a/quirks/50-system-hp.quirks +++ b/quirks/50-system-hp.quirks @@ -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 diff --git a/quirks/50-system-huawei.quirks b/quirks/50-system-huawei.quirks index f6eab4ee..51bdbe9d 100644 --- a/quirks/50-system-huawei.quirks +++ b/quirks/50-system-huawei.quirks @@ -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 diff --git a/quirks/50-system-lenovo.quirks b/quirks/50-system-lenovo.quirks index 8d31f610..dd49b3bc 100644 --- a/quirks/50-system-lenovo.quirks +++ b/quirks/50-system-lenovo.quirks @@ -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 diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index dd09468b..497b64d3 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -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); } diff --git a/src/quirks.c b/src/quirks.c index 6364549c..3d430486 100644 --- a/src/quirks.c +++ b/src/quirks.c @@ -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"; diff --git a/src/quirks.h b/src/quirks.h index b6ea220a..a551210b 100644 --- a/src/quirks.h +++ b/src/quirks.h @@ -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, diff --git a/src/util-prop-parsers.c b/src/util-prop-parsers.c index a438ba59..42405eb6 100644 --- a/src/util-prop-parsers.c +++ b/src/util-prop-parsers.c @@ -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;