Slide sideways on space to move the cursor
As on phone keyboards: a sideways move on space moves the cursor right away, along the line only, without blanking the keys. Long-press space still opens the full trackpad. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -208,6 +208,17 @@ private Q_SLOTS:
|
||||
QCOMPARE(engine.output, QString());
|
||||
QCOMPARE(engine.keysyms, (QList<quint32>{XKB_KEY_Right, XKB_KEY_Right, XKB_KEY_Right}));
|
||||
}
|
||||
|
||||
void spaceSlideMovesCursorAtOnce()
|
||||
{
|
||||
const QPoint space = keyCenter({}, u"space"_s);
|
||||
QTest::touchEvent(&window, touchscreen).press(0, space);
|
||||
QTest::touchEvent(&window, touchscreen).move(0, space - QPoint(30, 0));
|
||||
QVERIFY(!qobject_cast<KeyboardSurface *>(keyboard)->isTrackpadActive()); // keys keep their labels
|
||||
QTest::touchEvent(&window, touchscreen).release(0, space - QPoint(30, 0));
|
||||
QCOMPARE(engine.output, QString());
|
||||
QCOMPARE(engine.keysyms, (QList<quint32>{XKB_KEY_Left, XKB_KEY_Left}));
|
||||
}
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestKeyboardSurface)
|
||||
|
||||
Reference in New Issue
Block a user