Closed srl295 closed 3 weeks ago
Test specification and instructions
π© GROUP_WIN_10: TextEditor
π© GROUP_WIN_11: TextEditor
β GROUP_MAC: Chrome Browser
β GROUP_LINUX: Chrome Brower (https://www.editpad.org/)
β GROUP_WIN_10: WordPad
π© GROUP_WIN_11: Wordpad
β GROUP_MAC: TextEdit
β GROUP_LINUX: gedit
π© GROUP_WIN_10: TextEditor
π© GROUP_WIN_11: TextEditor
π© GROUP_MAC: Chrome Browser
β GROUP_LINUX: Chrome Brower
π© GROUP_WIN_10: WordPad
π© GROUP_WIN_11: WordPad
β GROUP_MAC: TextEdit
β GROUP_LINUX: gedit
For #10955
This should be fixing that issue, right? in which case "fixes ..." rather than "for ..." (and don't forget to link in the Development right hand panel in GH)
keymanapp-test-bot skip
I think we can usefully have user tests for this to verify that outcome is as we expect on each platform. Need to spec with non-compliant apps, a test for pressing specific frame key and another test for non-frame keys, with a keyboard rule that depends on preceding context. With sil_euro_latin, type ' ... frame key | non frame key ... e, and for non-frame key it should combine, with frame key it shouldn't. We could use e.g. Insert as a non-frame key, and e.g. Escape as a frame key, if using an app such as Notepad where those keys won't have any other effect.
In fact may need to have tests with compliant apps as well, to verify markers are dropped when frame keys are pressed. Needs thinking through a bit but I think this is critical given this is fundamental to how Keyman works.
For #10955
This should be fixing that issue, right? in which case "fixes ..." rather than "for ..." (and don't forget to link in the Development right hand panel in GH)
I usually update that once it actually fixes.
keymanapp-test-bot skip
I think we can usefully have user tests for this to verify that outcome is as we expect on each platform. Need to spec with non-compliant apps, a test for pressing specific frame key and another test for non-frame keys, with a keyboard rule that depends on preceding context. With sil_euro_latin, type ' ... frame key | non frame key ... e, and for non-frame key it should combine, with frame key it shouldn't. We could use e.g. Insert as a non-frame key, and e.g. Escape as a frame key, if using an app such as Notepad where those keys won't have any other effect.
Good point. I have never done a user test so far. So I'm just used to skip.
In fact may need to have tests with compliant apps as well, to verify markers are dropped when frame keys are pressed. Needs thinking through a bit but I think this is critical given this is fundamental to how Keyman works.
Makes sense
getting closer.. i had to:
first_action
debug setting in one of the tests, because it was offIn the k_000___null_keyboard.kmn test (I'm getting familiar with kmx and its test code!) there's this case:
store(&NAME) '000 - null keyboard'
c Description: Tests null keyboard
c keys: [K_A][RALT K_B][SHIFT K_C]
c expected: aC
c expected context: C
c context:
store(&version) '6.0'
begin Unicode > use(Main)
group(Main) using keys
kmx does a reset here after the RAlt-b. But vkey 66 (K_B
) in the reset table is false.
Should it reset because of the modifiers?
reset on modifiers doesn't work well either per other tests.
aha.. it needs to be a key UP event also
OK, only failing kmx test is the k_020 deadkeys one..
action: emit keystroke
expected : U+0077 U+0078 U+0061 U+0061 U+0020 U+006F U+006B [wxaa ok]
text store : U+0077 U+0078 U+0079 U+0061 U+0061 U+0063 U+0064 [wxyaacd]
expected context: U+0077 U+0078 U+0061 U+0061 U+0020 U+006F U+006B [wxaa ok]
should pass - the check for chars_to_delete seems to be counterproductive
@rc-swag @mcdurdin any comments on the user test required? Assuming the code passes that is going to be the last blocking issue.
The k_102 keytest tests exactly that markers are dropped:
<key id="q" output="q\m{q}"/>
<transform from="q\m{q}a" to="A" />
then typing qEntera yields qa
not A
because the enter drops markers.
What's the best way to specify that in user tests?
What's the best way to specify that in user tests?
I will write some user tests for this today.
(moved up into description)
Hmm, I think I need to add a test case for the numlock keys *; / ;- . To test it manually I would need to update the test keyboard to have a transform based on these.
Why does the check status show 'user tests are not required' still?
@keymanapp-test-bot retest
kmx does a reset here after the RAlt-b. But vkey 66 (
K_B
) in the reset table is false.Should it reset because of the modifiers?
Yes, Ctrl or Alt + another (unmatched) key should reset. Ctrl or Alt pressed and released without a chord should not cause a reset.
This is a critical change late in beta to the kmx processor (less worried about ldml processor at this point).
We need to have user tests run on Windows, Linux, and macOS. We need both compliant and non-compliant apps in all cases. For compliant apps, we want to see that markers are reset when frame key is pressed -- and those tests are showing that. For non-compliant apps, we want to verify that all context is reset when frame key is pressed.
I started a new ldml keyboad on friday because i want to test some missing scenarios. I can expand the test cases when I do that.
On Sat, 13 Apr 2024, 9:58 am Marc Durdin, @.***> wrote:
This is a critical change late in beta to the kmx processor (less worried about ldml processor at this point).
We need to have user tests run on Windows, Linux, and macOS. We need both compliant and non-compliant apps in all cases. For compliant apps, we want to see that markers are reset when frame key is pressed -- and those tests are showing that. For non-compliant apps, we want to verify that all context is reset when frame key is pressed.
β Reply to this email directly, view it on GitHub https://github.com/keymanapp/keyman/pull/11172#issuecomment-2052707316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN5XSSFO4EWRK4XQINH5IXLY5BYJHAVCNFSM6AAAAABFYCRNWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJSG4YDOMZRGY . You are receiving this because you were mentioned.Message ID: @.***>
Itβs after rule processing.
Yes should check vk <= length of array
I don't follow the handling of the numberpad keys. I had previously noted before this change that the numberpad keys with key caps /
,*
,-
,+
, Do not get inserted into the the context. I was looking at making a manual keyboard that had rules with these characters to see show the rule could be matched as the pressing these keys no longer results in a context reset. However, I realised that it only works when you press the equivalent of these keys Not using the numberpad. Using the numberpad the characters never make it into the context.
TEST_SCROLLLOCK_KEY_NO_RESET (PASSED): 1. Pressed ' key. 2. Enable Scroll lock. 3. Pressed e key and verified that it showed the expected result.
TEST_CONTROL_1 (PASSED): 1. Pressed ' key. 2. Pressed e key and verified that it showed the expected output.
TEST_FRAME_KEY_RESET_MARKERS (PASSED): 1. Pressed ' key. Pressed the right arrow. Then pressed e key. Verified that it showed the expected output.
TEST_FRAME_KEY_RESET_NOMARKERS (PASSED): 1. Pressed 1// key. 2. Pressed the right arrow. Then, pressed 2 key. Verified that it showed the expected output.
TEST_SCROLLLOCK_KEY_NO_RESET (FAILED): 1. Pressed ' key. 2. Pressed scroll lock ON. 3. Pressed the e key and noticed that it showed the wrong output.
TEST_FRAME_SCROLL_LOCK_NO_RESET (FAILED): 1. Pressed ^ key. 2. Pressed scroll lock ON. 3. Pressed e key. Noticed that it showed the wrong output.
TEST_FRAME_SCROLL_LOCK_NO_RESET (FAILED): 1. Pressed ^ key. 2. Pressed scroll lock ON. 3. Pressed e key. Noticed that it showed the wrong output.
TEST_SCROLLLOCK_KEY_NO_RESET (FAILED): 1. Pressed ' key. 2. Enable Scroll lock. 3. Pressed e key. Verified that it showed the expected result.
TEST_SCROLLLOCK_KEY_NO_RESET (FAILED): 1. Pressed ' key. 2. Pressed scroll lock ON. 3. Pressed the e key and noticed that it showed the wrong output.
TEST_FRAME_SCROLL_LOCK_NO_RESET (FAILED): 1. Pressed ^ key. 2. Pressed scroll lock ON. 3. Pressed e key. Noticed that it showed the wrong output.
TEST_FRAME_SCROLL_LOCK_NO_RESET (FAILED): 1. Pressed ^ key. 2. Pressed scroll lock ON. 3. Pressed e key. Noticed that it showed the wrong output.
@bharanidharanj looking at:
I would use the Mac TextEdit as a compliant app, and it seems there's a list of apps at the link above. do you have any of those installed?
TEST_SCROLLLOCK_KEY_NO_RESET (PASSED): 1. Pressed ' key. 2. Pressed scroll lock key. 3. Pressed e and verified it showed the correct output.
TEST_CONTROL_1 (FAILED): Tested with the attached PR build (Keyman 17.0.307-beta (package version 17.0.307-1~PR-11172-2732.1+mantic1) on Ubuntu Mantic Linux OS (VM) and here is my observation: 1. Installed SIL_EuroLatin keyboard. 2. Opened Chrome browser. 3. Clicked the Search bar. Pressed ' key. 4. Pressed e and noticed that it showed the wrong output.
TEST_FRAME_KEY_RESET_MARKERS (PASSED): 1. Pressed '. 2. Pressed right arrow key. 3. Pressed e and verified that it showed correct output.
TEST_FRAME_KEY_RESET_NOMARKERS (PASSED): 1. Pressed 1//. 2. Pressed right arrow key. 3. Pressed 2 key and verified that it showed the expected output.
TEST_SCROLLLOCK_KEY_NO_RESET (FAILED): 1. Pressed ' key. 2. Pressed scroll lock key. 3. Pressed e and noticed that it showed the wrong output.
TEST_CONTROL_1 (PASSED): Tested with the attached PR build (Keyman 17.0.307-beta (package version 17.0.307-1~PR-11172-2732.1+mantic1) on Ubuntu Mantic Linux OS (VM) and here is my observation: 1. Installed English (ContextReset) keyboard. 2. Opened gedit. 3. Pressed ' key. 4. Pressed e and verified that it showed the expected output.
TEST_FRAME_KEY_RESET_MARKERS (FAILED): 1. Pressed '. 2. Pressed right arrow key. 3. Pressed e and noticed that it showed the wrong output.
TEST_FRAME_KEY_RESET_NO_MARKERS (PASSED): 1. Pressed a. 2. Pressed right arrow. 3. Pressed Shift+8 keys. Verified that it showed the expected output.
TEST_FRAME_SCROLL_LOCK_NO_RESET (PASSED): 1. Pressed ' key. 2. Pressed scroll lock key. 3. Pressed e and verified that it showed the correct output.
TEST_CONTROL_1 (PASSED): Tested with the attached PR build (Keyman 17.0.307-beta (package version 17.0.307-1~PR-11172-2732.1+mantic1) on Ubuntu Mantic Linux OS (VM) and here is my observation: 1. Installed English (ContextReset) keyboard. 2. Opened Chrome browser. 3. Clicked the Search bar. Pressed ' key. 4. Pressed e and verified that it showed the expected output.
TEST_FRAME_KEY_RESET_MARKERS (PASSED): 1. Pressed '. 2. Pressed right arrow key. 3. Pressed e and verified that it showed correct output.
TEST_FRAME_KEY_RESET_NO_MARKERS (PASSED): 1. Pressed a. 2. Pressed right arrow key. 3. Pressed shift+8 key and verified that it showed the expected output.
TEST_FRAME_SCROLL_LOCK_NO_RESET (PASSED): 1. Pressed ^ key. 2. Pressed scroll lock key. 3. Pressed e and verified that it showed the correct output.
TEST_SCROLLLOCK_KEY_NO_RESET (FAILED): 1. Pressed ' key. 2. Enable Scroll lock (by pressing Fn+Shift+F12 keys) . 3. Pressed e key and noticed that it showed the wrong output.
TEST_SCROLLLOCK_KEY_NO_RESET (FAILED): 1. Pressed ' key. 2. Pressed scroll lock ON (by pressing Fn+Shift+F12 keys). 3. Pressed the e key and noticed that it showed the wrong output.
TEST_CONTROL_1 (PASSED): Tested with the attached PR build (Keyman 17.0.307-beta-test-11172) on macOS Sonoma and here is my observation: 1. Installed English (ContextReset) keyboard. 2. Opened TexEdit app. 3. Pressed ' key. 4. Pressed e and verified that it showed the expected output.
TEST_FRAME_KEY_RESET_MARKERS (PASSED): 1. Pressed ^. 2. Pressed right arrow key. 3. Pressed e and verified that it showed correct output.
TEST_FRAME_KEY_RESET_NO_MARKERS (FAILED): 1. Pressed a. 2. Pressed right arrow key. 3. Pressed Shift + 8 and noticed that it showed the wrong output.
TEST_FRAME_SCROLL_LOCK_NO_RESET (FAILED): 1. Pressed ^ key. 2. Pressed scroll lock (by pressing fn+shift+F12 keys) key. 3. Pressed e and noticed that it showed the incorrect output.
@bharanidharanj we're going to rework this one a bit. please hold off on testing
@rc-swag OK now i'm tracking.
LDML supports_normalization()
. So we call actions_normalize()
.
we've cleared the context, so then actions_normalize tries to sync the context with the (cleared) context.
kmx situation will call the following. whereas actions_normalize will try to delete any mismatch.
* Refresh app_context to match the cached_context. Does not do normalization,
* unlike `actions_normalize`. Used in conjunction with keyboard processors that
* do not support normalization. Resulting app context is same as the cached
* context, but without markers.
... */
bool km::core::actions_update_app_context_nfu(
but in the kmx case, cached_context
is also now empty. however, the above function does NOT set code_points_to_delete. It actually just replaces the app_context with the (now cleared) context.
I guess what I'm wondering is if actions_normalize()
should have something such as the following at the top:
diff --git a/core/src/actions_normalize.cpp b/core/src/actions_normalize.cpp
index 3384fda975..a250d6d192 100644
--- a/core/src/actions_normalize.cpp
+++ b/core/src/actions_normalize.cpp
@@ -46,6 +46,11 @@ bool km::core::actions_normalize(
return false;
}
+ if (cached_context->empty()) {
+ // cached context was cleared - so don't consider app context.
+ km_core_context_clear(static_cast<km_core_context*>(app_context));
+ }
+
/*
The code_points_to_delete value at this point is in NFD. The cached_context
is in NFD and has already been updated by the keyboard processor to the
that is, if there's nothing in the cached context, don't consider any app_context.
if i'm reading right this would make the ldml behavior match kmx in this situation?
@srl295 That sounds appropriate but I have been out of the loop long enough that I am not 100% confident that I am thinking through all scenarios.
that is, if there's nothing in the cached context, don't consider any app_context.
Thank you for the detailed explanation. What you propose would work however, I am thinking that maybe we are handling the result of the invalidated context in two places which may get lost when we look at this code in 1 years time. Do you think we could clear the app_context
at the same time we clear the cached context
if invalidate_context is true.
That way the actions_normalize
can stay as it is?
that is, if there's nothing in the cached context, don't consider any app_context.
Thank you for the detailed explanation. What you propose would work however, I am thinking that maybe we are handling the result of the invalidated context in two places which may get lost when we look at this code in 1 years time. Do you think we could clear the
app_context
at the same time we clear thecached context
if invalidate_context is true. That way theactions_normalize
can stay as it is?
that makes even more sense. i will try that, let me see if i can install this locally and test out the cases myself.
So, I installed the build artifact, and was not able to reproduce the issue so far with the latest commit
Now installing a slightly prior version to make sure i can repro what Ross saw.
ok SUCCESS i repro'ed the problem in windows downloading an older build of this PR!
@mcdurdin I can investigate but you may know, do the number lock keys not get passed to the keyboard processors?
I was going to write some tests to make sure the number lock keys *;/;+;-; did not reset context however they do. (or they don't get added to the context)
Non-compliant Load euro-latin
Non-compliant context reset
Star
@mcdurdin I can investigate but you may know, do the number lock keys not get passed to the keyboard processors?
I don't have a memory on the answer to this, sorry. I think we supported numlock on + numeric keypad in the past, but it's been a long time since I have played with it.
Ok I am creating a separate issue to deal with the numberpad characters. This PR is solving the blocking issue with LDML, it is adding the vkreset array. Anymore is making it too hard to track the changes. https://github.com/keymanapp/keyman/issues/11250
@keymanapp-test-bot retest SUITE_KMX_PROCESSOR_NON_COMPLIANT GROUP_WIN_11 all , SUITE_KMX_PROCESSOR_COMPLIANT GROUP_WIN_11 all, SUITE_LDML_PROCESSOR_NON_COMPLIANT GROUP_WIN_11 all, SUITE_LDML_PROCESSOR_COMPLIANT GROUP_WIN_11 all
@keymanapp-test-bot retest SUITE_KMX_PROCESSOR_NON_COMPLIANT GROUP_WIN_10 TEST_SCROLLLOCK_KEY_NO_RESET GROUP_MAC TEST_SCROLLLOCK_KEY_NO_RESET GROUP_LINUX TEST_CONTROL_1 TEST_SCROLLLOCK_KEY_NO_RESET SUITE_KMX_PROCESSOR_COMPLIANT GROUP_WIN_10 TEST_SCROLLLOCK_KEY_NO_RESET GROUP_MAC TEST_SCROLLLOCK_KEY_NO_RESET GROUP_LINUX TEST_FRAME_KEY_RESET_MARKERS SUITE_LDML_PROCESSOR_NON_COMPLIANT GROUP_WIN_10 TEST_FRAME_SCROLL_LOCK_NO_RESET GROUP_MAC TEST_FRAME_SCROLL_LOCK_NO_RESET SUITE_LDML_PROCESSOR_COMPLIANT GROUP_WIN_10 TEST_FRAME_KEY_RESET_NO_MARKERS TEST_FRAME_SCROLL_LOCK_NO_RESET GROUP_MAC TEST_FRAME_KEY_RESET_NO_MARKERS TEST_FRAME_SCROLL_LOCK_NO_RESET GROUP_LINUX TEST_FRAME_KEY_RESET_MARKERS
@bharanidharanj the LDML tests now give editors for mac and linux
TEST_SCROLLLOCK_KEY_NO_RESET (FAILED): Retested with the updated PR build (Keyman 17.0.311-beta-test-11172) on Windows 10 OS and here is my observation: 1. Opened the Notepad app. 2. Pressed ' key. 3. Pressed scroll lock ON. 3. Pressed e key. Noticed that it produces wrong output.
TEST_SCROLLLOCK_KEY_NO_RESET (FAILED): Retested with the updated PR build (Keyman 17.0.311-beta-test-11172) on Windows 11 OS (VM) and here is my observation: 1. Opened the Notepad app. 2. Pressed ' key. 3. Pressed scroll lock ON. 3. Pressed e key. Noticed that it produces wrong output.
Fixes #10955 Fixes #10227
User Testing
Using Windows 10 or Windows 11. Install the keyman build from this PR.
Use the Text Editor linked in this PR under test artifacts. or if on Windows 10 you can use Notepad.
SUITE_KMX_PROCESSOR_NON_COMPLIANT:
For these tests make sure the application used on the operating system is a non-compliant. A app that is not able to give the context to Keyman.
GROUP_WIN_10: TextEditor
GROUP_WIN_11: TextEditor
GROUP_MAC: Chrome Browser
GROUP_LINUX: Chrome Brower (https://www.editpad.org/)
Install SIL Euro Latin
TEST_CONTROL_1
TEST_FRAME_KEY_RESET_MARKERS
This tests the markers are lost
TEST_FRAME_KEY_RESET_NOMARKERS
TEST_SCROLLLOCK_KEY_NO_RESET
Do not reset for scroll lock
SUITE_KMX_PROCESSOR_COMPLIANT:
For these tests make sure the application used on the operating system is compliant. That is Keyman can request the context from the application.
GROUP_WIN_10: WordPad
GROUP_WIN_11: Wordpad
GROUP_MAC: TextEdit
GROUP_LINUX: gedit
Install SIL Euro Latin
TEST_CONTROL_1
TEST_FRAME_KEY_RESET_MARKERS
This tests the markers are lost
TEST_FRAME_KEY_RESET_NOMARKERS
TEST_SCROLLLOCK_KEY_NO_RESET
Do not reset for scroll lock
SUITE_LDML_PROCESSOR_NON_COMPLIANT:
LDML keyboard
GROUP_WIN_10: TextEditor
GROUP_WIN_11: TextEditor
GROUP_MAC: Chrome Browser
GROUP_LINUX: Chrome Brower
Install contextreset.zip ldml keyboard
TEST_CONTROL_1
This was previously failing
TEST_FRAME_KEY_RESET_MARKERS
TEST_FRAME_KEY_RESET_NO_MARKERS
TEST_FRAME_SCROLL_LOCK_NO_RESET
TEST_MODIFIER_TAP_NO_RESET
Do not reset for modifier tap
SUITE_LDML_PROCESSOR_COMPLIANT:
LDML keyboard
GROUP_WIN_10: WordPad
GROUP_WIN_11: WordPad
GROUP_MAC: TextEdit
GROUP_LINUX: gedit
Install contextreset.zip ldml keyboard
TEST_CONTROL_1
This was previously failing
TEST_FRAME_KEY_RESET_MARKERS
TEST_FRAME_KEY_RESET_NO_MARKERS
TEST_FRAME_SCROLL_LOCK_NO_RESET
TEST_MODIFIER_TAP_NO_RESET
Do not reset for modifier tap