Dead keys: act on compose status at press time

- Two dead keys that compose (´´ → ´) type the result right away; a dead
  key that can't continue the sequence types the old accents and starts anew
- With Ctrl/Alt/Super, a dead key sends its dead keysym, as the physical
  key does, not the spacing accent from its label

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 10:13:49 +02:00
co-authored by Claude Opus 5.5
parent 9abd19e5d3
commit 536fc12d2f
5 changed files with 64 additions and 15 deletions
+10
View File
@@ -30,6 +30,16 @@ private Q_SLOTS:
QCOMPARE(dead.compose(u"q"_s), u"ˇq");
}
void twoDeadKeysComposeAtOnce()
{
DeadKeys dead(u"en_US.UTF-8"_s);
QVERIFY(dead.press(XKB_KEY_dead_acute).isEmpty());
QCOMPARE(dead.press(XKB_KEY_dead_acute), u"´");
QVERIFY(!dead.isPending());
dead.press(XKB_KEY_dead_acute); // a fresh sequence
QCOMPARE(dead.compose(u"e"_s), u"é");
}
void cancelForgetsTheAccent()
{
DeadKeys dead(u"en_US.UTF-8"_s);