-
Epic
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Clean up and complete text input handling
Goals
- Correctly translate web text input events to Qt text input events.
- The web events are fairly well specified and documented
- Event ordering varies between browsers
- There is a certain amount of surprising cases
- Send the expected combination of key press/release and input events to Qt
- We are currently sending input events in cases where Qt expects keypress
- Remove code which duplicates the browser's implementation
- e.g. dead key handling
- Develop auto test to prevent regressions
- Ideally we want to have a test which verifies that we handle all possible browser behaviors
- Without having to run the test on all browser + input language combinations.
- Synthesize web events?
Test cases / Definition of Done / Acceptance
For all browsers/platforms:
- Simple typing should generate keypress / keyrelease
- Key repeat generates repeat events
- Handle langues
- Simplified Chinese
- Korean
- Virtual keyboard input (with word prediction)
- Dead key compose: ¨ + u -> ü
- macOS press-and-hold for character variant
Related
QTBUG-139596 (Web platform key events overview)
w3c key event viewer: https://w3c.github.io/uievents/tools/key-event-viewer.html
QKeyEvent manual test: qtbase/tests/manual/keyevents
QInputEvent manual test: git.qt.io/mosorvig/qt-webassembly-development/-/tree/a9cb44531d8aaa9b557944e3a17b071ff68e431f/qinputmethodevent
QTBUG-116873 (background on shortcut handling)