Cancel keys still down when hold-keys mode flips
The surface cancels its fingers under the old rules before the switch, so a release no longer reaches the other mode (a stuck repeater or held modifier one way, a second copy of the character the other). Sticky modifiers, shift and dead keys start over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -169,6 +169,22 @@ private Q_SLOTS:
|
||||
controller->setOptions({});
|
||||
}
|
||||
|
||||
void switchingHoldKeysMidPressCancelsTheKey()
|
||||
{
|
||||
const QPoint a = keyCenter(u"a"_s);
|
||||
QTest::touchEvent(&window, touchscreen).press(0, a);
|
||||
controller->setOptions({.holdKeys = true});
|
||||
QTest::touchEvent(&window, touchscreen).release(0, a);
|
||||
QVERIFY(engine.output.isEmpty());
|
||||
QVERIFY(engine.keyEvents.isEmpty());
|
||||
|
||||
QTest::touchEvent(&window, touchscreen).press(0, a);
|
||||
controller->setOptions({});
|
||||
QTest::touchEvent(&window, touchscreen).release(0, a);
|
||||
QVERIFY(engine.held.isEmpty());
|
||||
QVERIFY(engine.output.isEmpty()); // not typed a second time as a tap
|
||||
}
|
||||
|
||||
void slideFromNumbersKeyTypesAndReturns()
|
||||
{
|
||||
const QPoint layerKey = keyCenter(u".?123"_s, u"layer"_s);
|
||||
|
||||
Reference in New Issue
Block a user