mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 21:40:40 +01:00
quirks: touchpad: add ModelPressurePad
Unlike in traditional touchpads, whose pressure value equals contact size, on pressure pads pressure is a real physical axis. We don't take advantage of the pressure information reported by pressure pads yet, so we disable it to avoid errors. Add a new model quirk for pressure pads instead of disabling ABS_MT_PRESSURE and ABS_PRESSURE. Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
parent
0266428c93
commit
1d7172488d
6 changed files with 11 additions and 4 deletions
|
|
@ -147,6 +147,10 @@ ModelBouncingKeys
|
|||
timestamps can not be relied upon.
|
||||
ModelSynapticsSerialTouchpad
|
||||
Reserved for touchpads made by Synaptics on the serial bus
|
||||
ModelPressurePad
|
||||
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.
|
||||
AttrSizeHint=NxM, AttrResolutionHint=N
|
||||
Hints at the width x height of the device in mm, or the resolution
|
||||
of the x/y axis in units/mm. These may only be used where they apply to
|
||||
|
|
|
|||
|
|
@ -120,4 +120,4 @@ ModelTabletModeNoSuspend=1
|
|||
MatchBus=i2c
|
||||
MatchVendor=0x27C6
|
||||
MatchProduct=0x0F60
|
||||
AttrEventCode=-ABS_MT_PRESSURE;-ABS_PRESSURE;
|
||||
ModelPressurePad=1
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ AttrTrackpointMultiplier=1.25
|
|||
MatchBus=i2c
|
||||
MatchVendor=0x06CB
|
||||
MatchProduct=0xCE37
|
||||
AttrEventCode=-ABS_MT_PRESSURE;-ABS_PRESSURE;
|
||||
ModelPressurePad=1
|
||||
|
||||
[Lenovo Yoga C930 Tablet]
|
||||
MatchBus=i2c
|
||||
|
|
@ -272,7 +272,7 @@ AttrKeyboardIntegration=internal
|
|||
MatchBus=i2c
|
||||
MatchVendor=0x27C6
|
||||
MatchProduct=0x01E8
|
||||
AttrEventCode=-ABS_MT_PRESSURE;-ABS_PRESSURE;
|
||||
ModelPressurePad=1
|
||||
|
||||
# Duet 7i tablet switch activated by folding keyboard cover, or removing it.
|
||||
# We must not disable volume rocker 'keyboard'.
|
||||
|
|
|
|||
|
|
@ -3702,7 +3702,8 @@ tp_init_pressurepad(struct tp_dispatch *tp,
|
|||
*
|
||||
* See also #562
|
||||
*/
|
||||
if (libevdev_get_abs_resolution(device->evdev, ABS_MT_PRESSURE) != 0) {
|
||||
if (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_PRESSURE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,6 +269,7 @@ quirk_get_name(enum quirk q)
|
|||
case QUIRK_MODEL_TOUCHPAD_VISIBLE_MARKER: return "ModelTouchpadVisibleMarker";
|
||||
case QUIRK_MODEL_TRACKBALL: return "ModelTrackball";
|
||||
case QUIRK_MODEL_WACOM_TOUCHPAD: return "ModelWacomTouchpad";
|
||||
case QUIRK_MODEL_PRESSURE_PAD: return "ModelPressurePad";
|
||||
|
||||
case QUIRK_ATTR_SIZE_HINT: return "AttrSizeHint";
|
||||
case QUIRK_ATTR_TOUCH_SIZE_RANGE: return "AttrTouchSizeRange";
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ enum quirk {
|
|||
QUIRK_MODEL_TOUCHPAD_VISIBLE_MARKER,
|
||||
QUIRK_MODEL_TRACKBALL,
|
||||
QUIRK_MODEL_WACOM_TOUCHPAD,
|
||||
QUIRK_MODEL_PRESSURE_PAD,
|
||||
|
||||
_QUIRK_LAST_MODEL_QUIRK_, /* Guard: do not modify */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue