Skip to content

Instantly share code, notes, and snippets.

@ElijahLynn
Created June 28, 2026 04:32
Show Gist options
  • Select an option

  • Save ElijahLynn/ffc406b7231222a54aef62a63afdd26c to your computer and use it in GitHub Desktop.

Select an option

Save ElijahLynn/ffc406b7231222a54aef62a63afdd26c to your computer and use it in GitHub Desktop.
ThinkPad X1 Yoga Gen 7: fix touchpad ghost clicks while typing when using keyd (Arch Linux / GNOME / mutter 50.2)

ThinkPad X1 Yoga Gen 7 — Touchpad ghost clicks while typing

OS: Arch Linux
DE: GNOME on Wayland
Symptom: Cursor jumps / ghost clicks while typing, palm touches registering during typing

What triggered it

This started after upgrading on 2026-06-27:

  • mutter 50.1 → 50.2
  • gnome-shell 50.1 → 50.2
  • libinput 1.31.1 → 1.31.3

mutter 50.2 appears to have changed how it evaluates keyboard devices for disable-while-typing (DWT), breaking the workaround that previously made DWT functional.

Root cause

disable-while-typing was enabled in GNOME but had no effect whatsoever.

The reason: keyd grabs the physical keyboard exclusively (ids = * in /etc/keyd/default.conf), so libinput never sees any key events from the real keyboard. libinput's DWT mechanism thinks you are never typing, so the touchpad stays active the entire time.

keyd re-emits events through a virtual keyboard device (keyd virtual keyboard, typically /dev/input/event13), but libinput classifies this as an external USB device and ignores it for DWT purposes.

Fix

1. Tell libinput to treat the keyd virtual keyboard as an internal keyboard

Create /etc/libinput/local-overrides.quirks:

[keyd virtual keyboard]
MatchName=keyd virtual keyboard
AttrKeyboardIntegration=internal

Verify it is picked up:

libinput quirks list /dev/input/event13
# Should output: AttrKeyboardIntegration=internal

Takes effect after next login.

2. Set the DWT timeout

The valid range is 100–5000ms. Set it for the current user:

gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing-timeout 100

Set it system-wide (default for all users):

sudo mkdir -p /etc/dconf/db/local.d
printf '[org/gnome/desktop/peripherals/touchpad]
disable-while-typing-timeout=uint32 100
' | sudo tee /etc/dconf/db/local.d/01-touchpad
sudo dconf update

Devices on ThinkPad X1 Yoga Gen 7

  • event9 — SYNA8017:00 06CB:CEB2 Touchpad (source of ghost clicks)
  • event12 — TPPS/2 Elan TrackPoint (not the cause)
  • event13 — keyd virtual keyboard (needs AttrKeyboardIntegration=internal)

Why this works

keyd intercepts all physical keyboard events via EVIOCGRAB and re-emits them through its virtual device. From libinput's perspective, all typing comes from the keyd virtual keyboard. By marking it as internal, libinput uses those events to drive DWT — disabling the touchpad while you type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment