From 88da163768294107e2752c5dbadecf2adf08fa73 Mon Sep 17 00:00:00 2001 From: Mathias Eek <51080320+Cliffback@users.noreply.github.com> Date: Mon, 27 Apr 2026 08:49:48 +0200 Subject: [PATCH] Fix jumping cursor / disable-while-typing on ASUS ROG Flow Z13 detachable keyboard (#5452) * Fix disable-while-typing on ASUS ROG Flow Z13 detachable keyboard * Replace lsusb with DMI detection for Z13 keyboard * Use omarchy-hw-match instead of custom z13_present function --- install/config/all.sh | 1 + .../config/hardware/asus/fix-z13-touchpad.sh | 18 ++++++++++++++++++ migrations/1777072987.sh | 7 +++++++ 3 files changed, 26 insertions(+) create mode 100644 install/config/hardware/asus/fix-z13-touchpad.sh create mode 100644 migrations/1777072987.sh diff --git a/install/config/all.sh b/install/config/all.sh index 1c2a5139..78f249ec 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -52,6 +52,7 @@ run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-display.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-audio-mixer.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-mic.sh +run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-z13-touchpad.sh run_logged $OMARCHY_INSTALL/config/hardware/framework/fix-f13-amd-audio-input.sh run_logged $OMARCHY_INSTALL/config/hardware/framework/qmk-hid.sh diff --git a/install/config/hardware/asus/fix-z13-touchpad.sh b/install/config/hardware/asus/fix-z13-touchpad.sh new file mode 100644 index 00000000..0df729ff --- /dev/null +++ b/install/config/hardware/asus/fix-z13-touchpad.sh @@ -0,0 +1,18 @@ +# Fix disable-while-typing on ASUS ROG Flow Z13 detachable keyboard. +# +# The Z13's detachable keyboard touchpad is detected as external by udev, +# which prevents libinput's disable-while-typing (dwt) from pairing it +# with the keyboard. This causes ghost touchpad taps from keyboard +# flex/vibration while typing quickly, jumping the cursor to random positions. +# +# Upstream libinput (50-system-asus.quirks) marks the keyboard as internal +# (AttrKeyboardIntegration=internal), but touchpad integration is controlled +# via udev, not libinput quirks. This udev rule marks the touchpad as internal +# so dwt can properly pair it with the keyboard. + +if omarchy-hw-asus-rog && omarchy-hw-match "GZ302"; then + sudo tee /etc/udev/rules.d/99-omarchy-asus-z13-touchpad.rules > /dev/null <<'EOF' +ACTION=="add|change", KERNEL=="event*", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="1a30", ENV{ID_INPUT_TOUCHPAD}=="1", ENV{ID_INPUT_TOUCHPAD_INTEGRATION}="internal" +EOF + sudo udevadm control --reload-rules +fi diff --git a/migrations/1777072987.sh b/migrations/1777072987.sh new file mode 100644 index 00000000..e2d6080c --- /dev/null +++ b/migrations/1777072987.sh @@ -0,0 +1,7 @@ +echo "Fix disable-while-typing on ASUS ROG Flow Z13 detachable keyboard" + +source $OMARCHY_PATH/install/config/hardware/asus/fix-z13-touchpad.sh + +if [[ -f /etc/udev/rules.d/99-omarchy-asus-z13-touchpad.rules ]]; then + omarchy-state set reboot-required +fi