Gestures: flick, long-press alternates, trackpad, layer slide, rollover

- PointerTracker: per-finger gesture state machine (pure, unit-tested)
- AlternatesPicker + AlternatesPopup.qml: long-press choices, finger selects
- Space long-press trackpad moves the cursor with arrow keysyms
- Slide from .?123 onto a symbol types it and switches back
- New finger commits pending taps (iOS rollover)
- Flick animation: secondary symbol slides down as the finger moves
- Transparent popup margin with an input region that passes clicks through
- tst_keyboardsurface: end-to-end gesture tests on the real QML

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 14:55:49 +02:00
co-authored by Claude Opus 5.5
parent be14bbcc62
commit 2b5edeb365
23 changed files with 901 additions and 35 deletions
+13 -4
View File
@@ -13,7 +13,9 @@ Item {
required property real keyWidth
required property real keyHeight
required property bool pressed
required property real flickProgress
property int shiftMode: KeyboardController.Off
property bool blank: false // labels hidden, e.g. in trackpad mode
readonly property bool isCharacter: keyType === "char" || keyType === "space"
readonly property bool shiftActive: keyType === "shift" && shiftMode !== KeyboardController.Off
@@ -52,13 +54,18 @@ Item {
color: key.lit ? Theme.characterKey : Theme.functionKey
}
// Flicking slides the secondary symbol down into the main position.
Text {
id: flick
visible: text !== ""
readonly property real restY: key.height * 0.1
readonly property real centerY: (key.height - height) / 2
visible: text !== "" && !key.blank
text: key.flickLabel
anchors { horizontalCenter: parent.horizontalCenter; top: parent.top; topMargin: key.height * 0.1 }
font.pixelSize: key.height * 0.24
color: Theme.secondaryText
anchors.horizontalCenter: parent.horizontalCenter
y: restY + (centerY - restY) * key.flickProgress
font.pixelSize: key.height * (0.24 + 0.16 * key.flickProgress)
color: key.flickProgress >= 1 ? Theme.text : Theme.secondaryText
}
Text {
@@ -70,5 +77,7 @@ Item {
}
font.pixelSize: key.height * (key.isWord ? 0.24 : flick.visible ? 0.34 : 0.4)
color: Theme.text
visible: !key.blank
opacity: 1 - key.flickProgress
}
}