From ed0dc92fffc6b4e5a68fe510a1b377ba97be58fb Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Thu, 25 Jun 2026 09:54:02 +0900 Subject: [PATCH] Recognize {PGDN} Auto-Type placeholder The {PGDN} placeholder is documented but only pgup/pgdown are registered in g_placeholderToKey, so {PGDN} fails to resolve and aborts the rest of the Auto-Type sequence. Add pgdn as an alias for Qt::Key_PageDown, mirroring the existing ins/insert and del/delete aliases (lookup already lowercases the placeholder). Also assert {PGDN} in the syntax-check test. Fixes #13379 Signed-off-by: Arpit Jain --- src/autotype/AutoType.cpp | 1 + tests/TestAutoType.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp index da478c44e..0ab6edc3c 100644 --- a/src/autotype/AutoType.cpp +++ b/src/autotype/AutoType.cpp @@ -80,6 +80,7 @@ namespace {"end", Qt::Key_End}, {"pgup", Qt::Key_PageUp}, {"pgdown", Qt::Key_PageDown}, + {"pgdn", Qt::Key_PageDown}, {"backspace", Qt::Key_Backspace}, {"bs", Qt::Key_Backspace}, {"bksp", Qt::Key_Backspace}, diff --git a/tests/TestAutoType.cpp b/tests/TestAutoType.cpp index 5af0af984..231d68006 100644 --- a/tests/TestAutoType.cpp +++ b/tests/TestAutoType.cpp @@ -350,6 +350,8 @@ void TestAutoType::testAutoTypeSyntaxChecks() QVERIFY2(AutoType::verifyAutoTypeSyntax("{NUMPAD1 3}", entry, error), error.toLatin1()); + QVERIFY2(AutoType::verifyAutoTypeSyntax("{PGDN}", entry, error), error.toLatin1()); + QVERIFY2(AutoType::verifyAutoTypeSyntax("{S:SPECIALTOKEN}", entry, error), error.toLatin1()); QVERIFY2(AutoType::verifyAutoTypeSyntax("{S:SPECIAL TOKEN}", entry, error), error.toLatin1()); QVERIFY2(AutoType::verifyAutoTypeSyntax("{S:SPECIAL_TOKEN}", entry, error), error.toLatin1());