Patch for libinput touchpad driver to fix annoying issue with tap & drag causing ghost clicks.
Find a file
2026-04-03 16:08:59 +02:00
keys/pgp 1.30.0-1: namcap fixes, use signed git tags 2025-11-25 15:55:41 +01:00
LICENSES License package as 0BSD 2025-07-26 11:10:08 +02:00
.nvchecker.toml 1.30.0-1: namcap fixes, use signed git tags 2025-11-25 15:55:41 +01:00
.SRCINFO 1.31.1-1 2026-04-02 04:16:16 +02:00
LICENSE License package as 0BSD 2025-07-26 11:10:08 +02:00
PKGBUILD set patch b2sums to SKIP 2026-04-03 16:08:00 +02:00
README.md add README.md 2026-03-26 22:50:00 +01:00
REUSE.toml License package as 0BSD 2025-07-26 11:10:08 +02:00
tap-drag.patch fine tuned tap drag timeouts. May not be final! 2026-03-25 22:32:09 +01:00

libinput-fix

Patch for libinput touchpad driver to fix annoying issue with tap & drag causing ghost clicks, because of a hardcoded timeout that's set too high.

This repository contains:

  • A modified PKGBUILD (based on upstream Arch packaging)
  • A patch (tap-tuning.patch) that adjusts touchpad behavior

🔧 Initial build & install

makepkg -si

🔄 Update workflow

🟢 When a new libinput version is released

1. Update PKGBUILD

Open the file:

nano PKGBUILD

Find:

pkgver=1.31.0

Update to the new version:

pkgver=1.32.0

2. Update checksums (if needed)

If the source=() array changed or checksums are enforced:

updpkgsums

If using SKIP, this step is not required.


3. Build the package

makepkg -s

4. Update local repository

Copy the built package:

cp libinput-*.pkg.tar.zst ~/repo

Update the repo database:

cd ~/repo
repo-add customrepo.db.tar.gz *.pkg.tar.zst

5. Upgrade system

sudo pacman -Syu

The patched version will then be installed.

Modified Constants

DEFAULT_DRAG_TIMEOUT_PERIOD_BASE: Defines how long libinput waits after a tap before deciding whether a drag should start.

  • Higher value → more forgiving, easier to start drag
  • Lower value → stricter, reduces accidental drags

DEFAULT_DRAG_TIMEOUT_PERIOD_PERFINGER: Adds additional delay depending on the number of fingers used:

  • 1 finger → base + 1 × value
  • 2 fingers → base + 2 × value

Helps differentiate single-finger vs multi-finger interactions.

DEFAULT_TAP_MOVE_THRESHOLD: Defines how much finger movement (in mm) is still considered a tap.

  • Higher value → ignores small fast movements (reduces accidental clicks)
  • Lower value → more sensitive, easier to trigger drag