Closed jahorton closed 5 months ago
Test specification and instructions
..1to9 numbers with key hints
..Tap the 8 key twice in quick succession
..Tap the 8 key continuously for at least 2 seconds
..Repeatedly tap 9 for at least five seconds..
..result 1
..result 2
..result 3
TEST_CUSTOM_MULTITAP_MODIFIER (FAILED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "English - Gesture Prototyping" keyboard. 2. Single-tapped the ◌́ key. Noticed that the number of letters, including all of the vowels are changed to versions using the wrong output of the accent mark. Seems to be an issue.
TEST_BASIC_SIMPLE_SHIFT (PASSED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Norwegian" keyboard. 2. Tapped the Spacebar key. Verified that the keyboard was in the default (lowercase) layer after this. 3. Tapped the shift key once. Verified that the keyboard changes to, and stays on, the shift layer.
TEST_BASIC_MODIPRESS (FAILED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Norwegian - EuroLatin (SIL)" keyboard. 2. Tapped the Spacebar key. Verified that the keyboard was in the default (lowercase) layer after this. 3. Tapped and hold the shift key. Verified that the keyboard changes to the shift layer. 4. Tapped the A key. Verified that it produces an A in the text area. Release the shift key. Verified that the keyboard is changed to the default layer as a result of releasing the shift key. Repeated steps 3 and 4 quickly and noticed that the shift layer was stuck at one point. Pressing on the Shift key does not do anything on the OSK. Seems to be an issue.
TEST_BASIC_MODIPRESS_HOLD (PASSED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Norwegian" keyboard. 2. Tapped the Spacebar key. Verified that the keyboard was in the default (lowercase) layer after this. 3. Tapped and hold the shift key. Verified that the keyboard is changed to the shift layer. 4. After one second, released the shift key. Verified that the keyboard is changed to the default layer.
TEST_NUMERIC_FROM_SHIFT (PASSED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Norwegian - EuroLatin (SIL)" keyboard. 2. Tapped the Spacebar key. Verified that the keyboard was in the default (lowercase) layer after this. 3. Tapped the shift key, to see the shift layer active on the keyboard. 4. Tapped and hold the numeric key (123) underneath the shift key. Verified that the keyboard is changed to the numeric layer. 5. Longpressed then selected the ‱ subkey. Verified that ‱ is emitted as text. 6. Release the the numeric key. Verified that the keyboard changes back to the shift layer. 7. Tapped the numeric key, releasing it immediately. 8. Repeated step 5 and verified that the keyboard automatically changes back to the default layer.
..subkey text 1
..subkey text 2
TEST_DELAYED_SUBKEY (FAILED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Norwegian - EuroLatin (SIL)" keyboard. 2. Tapped the Spacebar key. Verified that the keyboard was in the default (lowercase) layer after this. 3. Tapped the shift key, to activate the shift layer. 4. Tapped and hold the numeric key 9123) underneath the shift key. Verified that the keyboard changes to a numeric layer. 5. Longpressed the % key, without selecting a subkey yet. 6. Released the numeric key. Verified that the keyboard changes remain on the numeric layer, with the subkey menu still displayed. 6. Selected the ‱ subkey. I noticed that the layer has changed back to the default (lowercase) layer after getting the output ‱ on the screen. Seems to be an issue.
TEST_DOUBLETAP_CAPS (FAILED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. After running the 4th step (ie., Without touching the shift key at any point, type CAPS), the shift stuck with this step. 2. Single-tapped the shift key does not return to the base layer. Seems to be an issue.
TEST_CUSTOM_MULTITAP_MODIFIER (FAILED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. After running the 4th step it is showing the wrong output on the text screen. seems to be an issue.
TEST_FLICKS_BASIC (FAILED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. After running the 4th step it is showing the wrong output on the text screen. seems to be an issue.
TEST_FLICK_CORRECTION (PASSED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Followed the steps that are mentioned in the Test_Flick_Correction and it is working as expected.
TEST_FLICK_LOCKING (PASSED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Followed the steps that are mentioned in the Test_Flick_Locking and it is working as expected.
TEST_FLICK_DURING_MODIPRESS (FAILED): Tested using the standard "Test unminified KeymanWeb" test page from the mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. This test failed in Step 7 because the Shift layer (all uppercase) changed to the default (all lowercase) layer. (ie., after releasing the shift key) Seems to be an issue.
TEST_ALTERNATING_SHIFT_AND_KEY (FAILED): (please wait for the all-in-one retest request)
TEST_CUSTOM_MULTITAP_MODIFIER (FAILED): (please wait for the all-in one retest request)
TEST_APP_10_KEY_DIACRITICS (FAILED): (please wait for the all-in one retest request)
@keymanapp-test-bot retest all
Just pushed a bunch of fixes and such for the various issues we've been noting - things should work a lot better now, assuming the build goes through.
Since there have been a lot of changes, it's best to be sure I didn't break something that had been working before.
..Expected Output 8a
..Typing 8 key continuously
..Double-tap the 9 key once
..Repeatedly tap 9 key for at least five seconds
Test Results
..Double tap 8 key
..Triple-tap the 9 key
..Double-tap the 8 key
Test Results
- TEST_10_KEY_DIACRITICS (FAILED): [...]
Oh right, we changed that behavior with #9944, and the most recent merge with the base-branch added that in. Backspace doesn't nuke the deadkeys anymore... which means I need to rewrite that test to use a different deadkey-erasing behavior.
@keymanapp-test-bot retest TEST_10_KEY_DIACRITICS
@bharanidharanj That failed test is on me; I forgot that we changed a related behavior with #9944. I've updated the test instructions accordingly.
Turns out that I discovered a bug on master
while doing so; for the sake of user testing, I've gone ahead and fixed it here... and 🍒-picked it as #10039 for master
. It'd require a retooling of the test keyboard and heavier retooling of the instructions otherwise.
Also, something probably worth note/making an issue: TEST_APP_10_KEY_DIACRITICS will fail if performed on an iOS device if the 7
key step is removed... if the text area is empty before starting the test. My intuition tells me that this is due to one of the iOS quirks we noticed a while back: the iOS equivalent to a text-services framework signals a context reset any time the active text-input receiver has its text cleared. Well... multitapping on a context-initial diacritic-output-only key probably isn't helping things there, possibly causing a context-desync between the app and the keyboard engine. That doesn't seem entirely right, but it's probably quite related.
As it appears to be due to something iOS-specific and does not occur on Android, I think this issue should be documented and pursued separately.
On Android, the context-initial diacritic doesn't seem to get displayed properly in the emulator setup I use most frequently, but it is still present and does still combine properly according to keyboard rules. (Notably, placeholder text disappears when it should be visible, indicating the presence of text... even if it - the isolated diacritic - is not being displayed properly.) That'd be more of a rendering issue within the app and/or on Android, I guess.
Also, something probably worth note/making an issue: TEST_APP_10_KEY_DIACRITICS will fail if performed on an iOS device if the
7
key step is removed... if the text area is empty before starting the test. My intuition tells me that this is due to one of the iOS quirks we noticed a while back: the iOS equivalent to a text-services framework signals a context reset any time the active text-input receiver has its text cleared. Well... multitapping on a context-initial diacritic-output-only key probably isn't helping things there, possibly causing a context-desync between the app and the keyboard engine. That doesn't seem entirely right, but it's probably quite related.As it appears to be due to something iOS-specific and does not occur on Android, I think this issue should be documented and pursued separately.
Eh, why not.
Did a little investigation: our old enemy, U+200E (https://unicode-explorer.com/c/200E) has returned to haunt us. It's being automatically inserted at the start of the context whenever a diacritic is added in that position or directly after a different diacritic meeting this compound condition (e.g., it can chain).
This is occurring via setKeymanVal
calls to the ios-host.js script:
This has been verified via breakpoint when performing a repro for the conditions described above - that if-condition will trigger, resulting in, among other things, a deadkey-wipe.
The Swift-side interface that calls this:
Well, huh. That should handle it, right? Well... here's the thing...
So... there's no match, the byte-header doesn't get filtered, do not pass Go, do not collect $200, etc. Of course, that did work before... so a recent-ish version of iOS must have changed how the byte-header gets encoded. The filter-block was written in #1756 for version 14.0 in May 2019, and there have been quite a few new versions of iOS since then.
Also, I'd noticed weirdness with predictive-text even on master
- how an extra backspace was needed after reaching cleared text at the start of context for predictions to work right. It's definitely the same thing - our pred-text engine doesn't filter out byte-order marks either.
Given the investigation and related behaviors I've noted, it's a bug on the current master
and thus should be handled separately.
And, of course, fixing the fact that context-resets weren't resetting deadkeys (a la #10039)... caused me to run into a different context-sync issue, at least on iOS. Now checking if it also happens on Android.
Core issue there: there are two text updates during a multitap: 'restore original context' and then 'apply new text effects'. If text is updated from the app based on the first and not the second, while the JS side has done both, that causes a context desync.
As that last comment is something only relevant for feature-gestures
- because of multitaps - I went ahead and fixed that here.
..Double-tap 8 key
..Triple-tap 9 key
..Double-tap the 8 key after the change
..Double-tap the 8 key
..Triple-tap the 9-key
..Double-tap the 8th key
TEST_BASIC_SIMPLE_SHIFT (PASSED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Norwegian" keyboard. 2. After running step 3, it is verified that the keyboard remains on the shift layer.
TEST_BASIC_MODIPRESS (PASSED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Norwegian" keyboard. 2. After running step 8, it is verified that the keyboard changed to the default layer.
TEST_BASIC_MODIPRESS_HOLD (PASSED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Norwegian" keyboard. 2. After running step 6, it is verified that the keyboard changed to the default layer due to step 6.
..After running step 7
..After running step 12
TEST_DELAYED_SUBKEY (PASSED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Norwegian" keyboard. 2. Verified that the keyboard keyboard changed to the numeric layer after running step 4. 3. Also, verified that the keyboard changes remain on the numeric layer, with the subkey menu still displayed, after running step 8. 4. Verified that ‱ is emitted as text and that the layer has changed back to the shift layer.
TEST_DOUBLETAP_CAPS (PASSED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Norwegian" keyboard. 2. Verified that it is showing the expected outputs after running from 2 to 8.
TEST_CUSTOM_MULTITAP_MODIFIER (FAILED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Gesture Prototyping" keyboard. 2. Noticed that after running step 4, it is showing the wrong output in the text screen.
..H is the output after running step 5
..No deviation in the output after running step 7
..Numeric key appears after running step 8
TEST_FLICKS_BASIC (PASSED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Gesture Prototyping" keyboard. 2. After running step 4, it is verified that it outputs ù on the screen. 3. After running step 6, it is verified that it outputs ù on the screen. 4. After running step 8, it is verified that it outputs û on the screen.
TEST_FLICK_CORRECTION (FAILED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Gesture Prototyping" keyboard. 2. After running step 4, it is verified that it outputs ù on the screen. 3. After running step 8, it is observed that the u letter appears on the screen. seems to be an issue. 4. After running step 11, it is verified that it outputs u on the screen.
Test Results
- TEST_CUSTOM_MULTITAP_MODIFIER (FAILED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Gesture Prototyping" keyboard. 2. Noticed that after running step 4, it is showing the wrong output in the text screen.
Could you please elaborate on what the error is here? In the screenshot above... isn't that the expected output from the a
key from the layer reached by triple-tap?
To be clear - from this layer:
... wait a second. Step 4 - the first key. And yep, test-spec error again. That output is correct for the layer you should be reaching. Man, I did not proofread the tests with the varied diacritic forms correctly.
TEST_CUSTOM_MULTITAP_MODIFIER (PASSED): In which I update a test spec again; had the wrong output specified for a step, but the test results were correct for actual (and intended!) behavior.
Test Results
- TEST_FLICK_CORRECTION (FAILED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Gesture Prototyping" keyboard. 2. After running step 4, it is verified that it outputs ù on the screen. 3. After running step 8, it is observed that the u letter appears on the screen. seems to be an issue. 4. After running step 11, it is verified that it outputs u on the screen.
TEST_FLICK_CORRECTION (PASSED): In which it turns out another test spec needed updating to match current behavior. I think I wrote that test before the locked-flicks stuff was fully implemented; it makes sense for step 8 to emit that 'u', now that I inspect it more closely.
I've gone ahead and adjusted the test-spec accordingly.
..u text animated preview
..a text-animated preview
TEST_MODIPRESS_MULTITAP_FLICK_PREVIEW (PASSED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Gesture Prototyping" keyboard. 2. Double tapped then hold the Shift key. Tapped and hold the U key. Verified that the key preview is visible. 3. Dragged the finger on U purely north (straight up) and I was able to see Û key in the preview area. 4. Verified that the flick-animation in the preview scrolls to a Û. 5. Release the flick, when the Û key is fully visible. Verified that Û is output. 6. Repeated steps 2 through 6 quickly three or four times and verified that the Û appears repeatedly as the output. Seems to be working fine.
TEST_FLICK_DURING_MODIPRESS (PASSED): Retested using the standard "Test unminified KeymanWeb" test page from a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Selected "Gesture Prototyping" keyboard. 2. Tapped and hold the Shift key. Tapped and hold the U key. 3. Dragged it to straight-up position. I was able to see the Û key without "jumpy" in the preview area. Released the Shift key. Verified that the shift layer remains visible and that the flick animation is still active. 4. Returned the finger to its original position, able to see the U key slide back into place. 5. Dragged the finger in an up-and-right motion and I was able to see the Ú key in the preview. 6. While the Ú is visible in the center, tapped on the q key with the other finger. Verified that the keyboard returns to the default layer and Úq is output on the screen. Seems to be working fine.
This aims to cover a few "fun" edge cases that can easily arise during quick typing that involves modipresses:
The main idea behind point 2 above: during quick typing, it's very natural to lift the modipress finger to prepare to type a new key. This could easily trigger earlier than intended, so we keep the modipress active while the flick is still active.
Point 1 above then provides consistency with point 2 - in both cases, the layer "sticks" until the pending gesture is completed.
In case the user accidentally presses a new key either slightly before or simultaneously with release during this state, we can still allow the flick to complete. Since this is generally during quick typing, and the user did lift the modipress key, they've likely has anticipated the layer to return - and so we adjust for that expectation.
I will say that point 2 above was an interesting niche case to implement - it involved a second coming of the TWo caps problem (#7173 / #9802) from a slightly different angle. While it does add some complexity, it should help make flicks more robust to certain natural 'optimizations' we often subconsciously make while typing quickly.
Notes for future revisitation
❗ ❗ ❗
I ended up throwing in quite a number of other fixes into this one, as it held the big user test suite and was used as the anchor-point for demo builds. Not exactly ideal, but it is what it is at this point. FWIW, I did aim to keep the commits reasonably clean, so going commit by commit might help... though there was a merge from the base (including a master update) that may make certain aspects interesting to follow.
User Testing
Note that most of these tests will be repeats of user tests from previous PRs. Consider this largely a feature-branch regression-test suite... and thus tests worthy of consideration for becoming permanent regression tests once the feature-branch lands.
TEST_10_KEY_ROTA: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
8
key once, then wait for a second.8
key twice in quick succession, then wait for a second.8a
.8
key continuously for at least 2 seconds.8a8
,8aa
,8ab
,8ac
,8aA
,8aB
,8aC
, then back to8a8
(and continue from there)9
key once. AD
should be emitted as the result.9
for at least five seconds, paying attention to the key hints.TEST_10_KEY_DIACRITICS: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
8
key.à
à
.9
key.àê
ê
.ê
.8
key.àềa
à
's accent-mark on top the originalê
, as in the cropped screenshot above.a
.TEST_APP_10_KEY_DIACRITICS: Using the Keyman for Android test artifact...
77
is output.8
key.77à
à
.9
key.77àê
ê
.8
key.77àềa
à
's accent-mark on top the originalê
, as in the cropped screenshot above.a
.TEST_BASIC_SIMPLE_SHIFT: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
TEST_BASIC_MODIPRESS: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
A
key, verifying that it produces anA
.shift
layer'sA
key, then releasing quickly.TEST_BASIC_MODIPRESS_HOLD: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
TEST_NUMERIC_FROM_SHIFT: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
123
) underneath the shift key.%
key and select the‱
subkey.‱
is emitted as text.%
key and select the‱
subkey.TEST_DELAYED_SUBKEY: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
123
) underneath the shift key.%
key, but do not select a subkey yet.‱
subkey.‱
is emitted as text and that the layer has changed back to theshift
layer.TEST_DOUBLETAP_CAPS: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
All
.CAPS
.work
.Well
.All CAPS work Well
TEST_CUSTOM_MULTITAP_MODIFIER: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
◌́
key. (The key between the spacebar [left] and the Enter key [right].)◌́
accent mark.á
and verify that the corresponding letter is output.◌́
key; you should be returned to the default layer.◌́
, then triple-tap it, holding on the third tap.◌̂
mark◌́
-key's hint.â
and verify that the corresponding letter is output.◌́
key; you should be returned to the default layer.TEST_ALTERNATING_SHIFT_AND_KEY: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
H
key and release it.H
is output and that the layer returns todefault
after step 4.h
orH
) is not output each time you press theh
/H
key.123
) key and verify that the layer switches properly to keys with numbers in the top row and symbols in the middle two rows.TEST_FLICKS_BASIC: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
u
key.ù
u
key again and drag it in a northeast direction for at least a key-width before releasing it.ú
(does not replace the previous output)u
again and drag north (straight up) in the same manner.û
.TEST_FLICK_CORRECTION: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
u
key.ù
u
key.u
. The flick animation and key preview should disappear.u
key again.u
.TEST_FLICK_LOCKING: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
u
key.û
key in the preview area (assuming it's not blocked by your finger).ú
as you do so.ú
is visible and in the center, lift your finger and end the gesture.ú
is output.a
key; you should see similar previews and text there. (â
,á
)TEST_MODIPRESS_MULTITAP_FLICK_PREVIEW: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
U
key.U
purely north (straight up) - you should see theÛ
key in the preview area (assuming it's not blocked by your finger).Û
.Û
fully in-view, release the flick.Û
is output.TEST_FLICK_DURING_MODIPRESS: Using the standard "Test unminified KeymanWeb" test page from a mobile device...
U
key.Û
key in the preview area (assuming it's not blocked by your finger).Ú
as you do so.Ú
is visible and in the center, tap on theQ
key.Ú
orÚq
is output.Úq
is ideal, but if youra
tap is quick, you may only get theÚ
.I will note that sometimes, when doing the input quickly, I get only
Ú
(and not theq
). Not sure exactly why that is, but I felt it may be worth noting... and worth a future investigation. It is likely typing-speed related, since there's a fair bit ofawait
-async
there.