Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.8.2, 6.9.0, 6.9.1
-
None
-
EMSDK: 3.1.70
Qt: 6.9.1 (not released, but morning checkout from qt.io)
-
-
WebAssembly
Description
For any input field, it is possible to type in non-ASCII characters by using the Alt mode.
In this mode, user presses the left Alt key and typing the code of the character in the numeric block. When the 4 digits of the key code is entered and the Left key is released, the special character appears.
When using "Alt mode", it is not relevant whether the NumLock is activated or not, since it is a special entry mode.
In Qt WASM 6.8.2->6.9.1 there are difference between the entries while NumLock is enabled or not.
Reproduce:
1. open: https://hyperborg.com/cp/v6.9.1/cpnode.html (using Qt 6.9.1):
2. Turn off NumLock
3. Focus on the entry field
4. Press Left ALT
5. Type "0252" using the numeric block
6. The letter "ü" should appear on the screen (This is the expected working state)
(The screenshot also contains the output of the modified function (KeyEvent::KeyEvent(EventType type, emscripten:val event) from qtbase/src/plugins/platforms/wasm/qwasmevent.cpp. The modification that it dumps the code and webKey right after they are assigned, and same values and QTKEY (text) after some processing.
Checking the output, we see, that after Alt pressing the cursor events are appearing and creating the preferred outcome.
Now turn the NumLock on and repeat the process.
Now the code we have typed also appears on the text input, in front of the actual special character , while it should not be there, since Alt mode is a special character entry mode.
You can notice, that in this case, the Alt + number is processed in the ::KeyEvent function.
It is expected, that the typed-in numbers does not appear in any of the input fields in Alt mode, whether NumLock is on or off.
It is possible to cross-check by using a single notpad with and without NumLock.