mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 16:10:06 +01:00
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:
parent
1b4dbb9087
commit
bde6d07d57
10 changed files with 38 additions and 30 deletions
|
|
@ -148,6 +148,9 @@ ModelBouncingKeys
|
||||||
ModelSynapticsSerialTouchpad
|
ModelSynapticsSerialTouchpad
|
||||||
Reserved for touchpads made by Synaptics on the serial bus
|
Reserved for touchpads made by Synaptics on the serial bus
|
||||||
ModelPressurePad
|
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,
|
Unlike in traditional touchpads, whose pressure value equals contact size,
|
||||||
on pressure pads pressure is a real physical axis.
|
on pressure pads pressure is a real physical axis.
|
||||||
Indicates that the device is a pressure pad.
|
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
|
Enables or disables the evdev input property on the device. The prefix
|
||||||
for each entry is either '+' (enable) or '-' (disable). Entries may be
|
for each entry is either '+' (enable) or '-' (disable). Entries may be
|
||||||
a named input property or the hexadecimal value of that property.
|
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
|
AttrPointingStickIntegration=internal|external
|
||||||
Indicates the integration of the pointing stick. This is a string enum.
|
Indicates the integration of the pointing stick. This is a string enum.
|
||||||
Only needed for external pointing sticks. These are rare.
|
Only needed for external pointing sticks. These are rare.
|
||||||
|
|
|
||||||
|
|
@ -136,13 +136,13 @@ ModelTabletModeNoSuspend=1
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x27C6
|
MatchVendor=0x27C6
|
||||||
MatchProduct=0x0F60
|
MatchProduct=0x0F60
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Dell Mayabay Touchpad]
|
[Dell Mayabay Touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x06CB
|
MatchVendor=0x06CB
|
||||||
MatchProduct=0xCFA0
|
MatchProduct=0xCFA0
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Dell Precision 5480]
|
[Dell Precision 5480]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
|
|
@ -156,58 +156,58 @@ ModelTouchpadVisibleMarker=0
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x06CB
|
MatchVendor=0x06CB
|
||||||
MatchProduct=0xCFF8
|
MatchProduct=0xCFF8
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Dell laptop 16 Synaptics touchpad]
|
[Dell laptop 16 Synaptics touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x06CB
|
MatchVendor=0x06CB
|
||||||
MatchProduct=0xCFF9
|
MatchProduct=0xCFF9
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Dell laptop 14 Goodix touchpad]
|
[Dell laptop 14 Goodix touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x27C6
|
MatchVendor=0x27C6
|
||||||
MatchProduct=0x0F61
|
MatchProduct=0x0F61
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Dell laptop 16 Goodix touchpad]
|
[Dell laptop 16 Goodix touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x27C6
|
MatchVendor=0x27C6
|
||||||
MatchProduct=0x0F62
|
MatchProduct=0x0F62
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Dell 14 Premium DA14250 touchpad]
|
[Dell 14 Premium DA14250 touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x0488
|
MatchVendor=0x0488
|
||||||
MatchProduct=0x108C
|
MatchProduct=0x108C
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Dell 16 Premium DA16250 touchpad]
|
[Dell 16 Premium DA16250 touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x0488
|
MatchVendor=0x0488
|
||||||
MatchProduct=0x108D
|
MatchProduct=0x108D
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Dell laptop 14_1 Synaptics touchpad]
|
[Dell laptop 14_1 Synaptics touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x06CB
|
MatchVendor=0x06CB
|
||||||
MatchProduct=0xD01D
|
MatchProduct=0xD01D
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Dell laptop 16_1 Synaptics touchpad]
|
[Dell laptop 16_1 Synaptics touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x06CB
|
MatchVendor=0x06CB
|
||||||
MatchProduct=0xD01A
|
MatchProduct=0xD01A
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Dell laptop 14 Sensel touchpad]
|
[Dell laptop 14 Sensel touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x2C2F
|
MatchVendor=0x2C2F
|
||||||
MatchProduct=0x0034
|
MatchProduct=0x0034
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Dell laptop 16 Sensel touchpad]
|
[Dell laptop 16 Sensel touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x2C2F
|
MatchVendor=0x2C2F
|
||||||
MatchProduct=0x0033
|
MatchProduct=0x0033
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
# Clickpad that announces BTN_RIGHT
|
# Clickpad that announces BTN_RIGHT
|
||||||
# requires ModelPressurePad=1
|
# requires AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
[HONOR MagicBook Art 14]
|
[HONOR MagicBook Art 14]
|
||||||
MatchName=*TOPS0102*
|
MatchName=*TOPS0102*
|
||||||
MatchDMIModalias=dmi:*svnHONOR:*pnMRA-XXX*
|
MatchDMIModalias=dmi:*svnHONOR:*pnMRA-XXX*
|
||||||
MatchUdevType=touchpad
|
MatchUdevType=touchpad
|
||||||
AttrEventCode=-BTN_RIGHT
|
AttrEventCode=-BTN_RIGHT
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ AttrKeyboardIntegration=external
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x06CB
|
MatchVendor=0x06CB
|
||||||
MatchProduct=0xCFD2
|
MatchProduct=0xCFD2
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
# The HP OmniBook Ultra Flip Laptop 14-fh0xxx's custom Intel ISH firmware
|
# 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
|
# filters out events from its builtin keyboard and touchpad when the hinge is
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@ MatchUdevType=touchpad
|
||||||
MatchDMIModalias=dmi:*svnHUAWEI:*pnMRGF-XX*
|
MatchDMIModalias=dmi:*svnHUAWEI:*pnMRGF-XX*
|
||||||
AttrEventCode=-BTN_RIGHT
|
AttrEventCode=-BTN_RIGHT
|
||||||
|
|
||||||
# 2024 model requires ModelPressurePad=1
|
# 2024 model requires AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
[Huawei MateBook X Pro 2024 Touchpad]
|
[Huawei MateBook X Pro 2024 Touchpad]
|
||||||
MatchName=GXTP7863:00 27C6:01E0 Touchpad
|
MatchName=GXTP7863:00 27C6:01E0 Touchpad
|
||||||
MatchUdevType=touchpad
|
MatchUdevType=touchpad
|
||||||
MatchDMIModalias=dmi:*svnHUAWEI:*pnVGHH-XX*
|
MatchDMIModalias=dmi:*svnHUAWEI:*pnVGHH-XX*
|
||||||
AttrEventCode=-BTN_RIGHT
|
AttrEventCode=-BTN_RIGHT
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ AttrTrackpointMultiplier=1.25
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x06CB
|
MatchVendor=0x06CB
|
||||||
MatchProduct=0xCE37
|
MatchProduct=0xCE37
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
[Lenovo Yoga C930 Tablet]
|
[Lenovo Yoga C930 Tablet]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
|
|
@ -317,7 +317,7 @@ AttrKeyboardIntegration=internal
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x27C6
|
MatchVendor=0x27C6
|
||||||
MatchProduct=0x01E8
|
MatchProduct=0x01E8
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
# Duet 7i tablet switch activated by folding keyboard cover, or removing it.
|
# Duet 7i tablet switch activated by folding keyboard cover, or removing it.
|
||||||
# We must not disable volume rocker 'keyboard'.
|
# We must not disable volume rocker 'keyboard'.
|
||||||
|
|
@ -394,14 +394,14 @@ AttrKeyboardIntegration=internal
|
||||||
MatchName=*GXTP5100*
|
MatchName=*GXTP5100*
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G7+ASP*:*
|
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G7+ASP*:*
|
||||||
MatchUdevType=touchpad
|
MatchUdevType=touchpad
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
# The ThinkBook 14/16 G6+ IMH also has a similar issue as the G7+ mentioned above.
|
# The ThinkBook 14/16 G6+ IMH also has a similar issue as the G7+ mentioned above.
|
||||||
[Lenovo ThinkBook G6+ IMH]
|
[Lenovo ThinkBook G6+ IMH]
|
||||||
MatchName=*GXTP5100*
|
MatchName=*GXTP5100*
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G6+IMH*:*
|
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G6+IMH*:*
|
||||||
MatchUdevType=touchpad
|
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 sends bogus ABS_MT_TOOL_TYPE MT_TOOL_PALM events
|
||||||
[Lenovo Yoga Slim 7i Carbon]
|
[Lenovo Yoga Slim 7i Carbon]
|
||||||
|
|
@ -415,11 +415,11 @@ AttrEventCode=-ABS_MT_TOOL_TYPE
|
||||||
MatchName=*GXTP5100*
|
MatchName=*GXTP5100*
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX9-15Gen1*:*
|
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX9-15Gen1*:*
|
||||||
MatchUdevType=touchpad
|
MatchUdevType=touchpad
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
||||||
# The ThinkBook 14/16 G7+ IAH also has a similar issue as the ASP mentioned above.
|
# The ThinkBook 14/16 G7+ IAH also has a similar issue as the ASP mentioned above.
|
||||||
[Lenovo ThinkBook G7+ IAH touchpad]
|
[Lenovo ThinkBook G7+ IAH touchpad]
|
||||||
MatchName=*GXTP5100*
|
MatchName=*GXTP5100*
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G7+IAH*:*
|
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G7+IAH*:*
|
||||||
MatchUdevType=touchpad
|
MatchUdevType=touchpad
|
||||||
ModelPressurePad=1
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
||||||
|
|
|
||||||
|
|
@ -3673,8 +3673,7 @@ tp_init_pressurepad(struct tp_dispatch *tp, struct evdev_device *device)
|
||||||
* See also #562
|
* See also #562
|
||||||
*/
|
*/
|
||||||
if (libevdev_has_property(device->evdev, INPUT_PROP_PRESSUREPAD) ||
|
if (libevdev_has_property(device->evdev, INPUT_PROP_PRESSUREPAD) ||
|
||||||
libevdev_get_abs_resolution(device->evdev, ABS_MT_PRESSURE) != 0 ||
|
libevdev_get_abs_resolution(device->evdev, ABS_MT_PRESSURE) != 0) {
|
||||||
evdev_device_has_model_quirk(device, QUIRK_MODEL_PRESSURE_PAD)) {
|
|
||||||
libevdev_disable_event_code(device->evdev, EV_ABS, ABS_MT_PRESSURE);
|
libevdev_disable_event_code(device->evdev, EV_ABS, ABS_MT_PRESSURE);
|
||||||
libevdev_disable_event_code(device->evdev, EV_ABS, ABS_PRESSURE);
|
libevdev_disable_event_code(device->evdev, EV_ABS, ABS_PRESSURE);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -296,8 +296,6 @@ quirk_get_name(enum quirk q)
|
||||||
return "ModelTrackball";
|
return "ModelTrackball";
|
||||||
case QUIRK_MODEL_WACOM_TOUCHPAD:
|
case QUIRK_MODEL_WACOM_TOUCHPAD:
|
||||||
return "ModelWacomTouchpad";
|
return "ModelWacomTouchpad";
|
||||||
case QUIRK_MODEL_PRESSURE_PAD:
|
|
||||||
return "ModelPressurePad";
|
|
||||||
|
|
||||||
case QUIRK_ATTR_SIZE_HINT:
|
case QUIRK_ATTR_SIZE_HINT:
|
||||||
return "AttrSizeHint";
|
return "AttrSizeHint";
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,6 @@ enum quirk {
|
||||||
QUIRK_MODEL_LENOVO_T450_TOUCHPAD,
|
QUIRK_MODEL_LENOVO_T450_TOUCHPAD,
|
||||||
QUIRK_MODEL_LENOVO_X1GEN6_TOUCHPAD,
|
QUIRK_MODEL_LENOVO_X1GEN6_TOUCHPAD,
|
||||||
QUIRK_MODEL_LENOVO_X230,
|
QUIRK_MODEL_LENOVO_X230,
|
||||||
QUIRK_MODEL_PRESSURE_PAD,
|
|
||||||
QUIRK_MODEL_SCROLL_ON_MIDDLE_CLICK,
|
QUIRK_MODEL_SCROLL_ON_MIDDLE_CLICK,
|
||||||
QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD,
|
QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD,
|
||||||
QUIRK_MODEL_SYSTEM76_BONOBO,
|
QUIRK_MODEL_SYSTEM76_BONOBO,
|
||||||
|
|
|
||||||
|
|
@ -471,8 +471,14 @@ parse_input_prop_property(const char *prop,
|
||||||
goto out;
|
goto out;
|
||||||
} else {
|
} else {
|
||||||
int val = libevdev_property_from_name(s);
|
int val = libevdev_property_from_name(s);
|
||||||
if (val == -1)
|
if (val == -1) {
|
||||||
|
/* Remove once we require libevdev 1.13.6 */
|
||||||
|
if (streq(s, "INPUT_PROP_PRESSUREPAD")) {
|
||||||
|
val = INPUT_PROP_PRESSUREPAD;
|
||||||
|
} else {
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
}
|
||||||
prop = (unsigned int)val;
|
prop = (unsigned int)val;
|
||||||
}
|
}
|
||||||
props[idx].prop = prop;
|
props[idx].prop = prop;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue