Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(windows): remove legacy core and flag ⛏️ #8593

Merged
merged 32 commits into from
May 17, 2023

Conversation

rc-swag
Copy link
Contributor

@rc-swag rc-swag commented Apr 14, 2023

Fixes: #5442

Removing the legacy code that was replaced by the core. Also removing the feature flag for core integration.

User Testing

This will require a full acceptance test just to insure coverage of all the functionality.

Keyman for Windows Acceptance Test Procedures

  1. These test procedures are to be run before moving from alpha to beta, or beta to stable, or before PRs are merged into stable branches.

  2. Results are annotated with results, use > at the start of a new line under the checkbox/Test to note the result.

User Testing

Gather Assets for Testing

Setup Steps

  1. Uninstall previous versions of Keyman Desktop and Keyman Developer on the system
  2. Restart the system, install updates
  3. Make sure all additional Windows languages are removed
  4. Make sure no debug flags are set in HKCU/Software/Keyman/Debug

SUITE_BASELINE: Keyman for Windows Base Line Tests

  • GROUP_WIN10
  • GROUP_WIN11

Test cases

click to expand
  • TEST_INSTALL:

    • Install test build keyman-a.b.c.exe
    • Make sure Keyman is started and visible in the Notification area
  • TEST_KEYBOARD_INSTALLATION_REMOTE:

    • Start Keyman Configuration
    • Click Download Keyboard, select a keyboard from the download dialog and install it
    • If the package includes a readme file, verify that it appears in the install window.
    • If the package includes a welcome file, verify that it appears after installation.
    • Click OK to close Keyman Configuration
    • Start Notepad
    • Verify that the newly installed keyboard appears in the Keyman menu and can be selected
  • TEST_INSTALL_PKG_DISK:

    • Install a package from disk ##
    • Locate a .kmp file on disk and double-click to install it
    • If the package includes a readme file, verify that it appears in the install window.
    • If the package includes a welcome file, verify that it appears after installation.
    • Start Notepad
    • Verify that the keyboard appears in the Keyman menu
  • TEST_KEYBOARD_OUTPUT:

    • Start Notepad and select a Keyman keyboard (testing Legacy integration)
    • Verify that various test sequences are output correctly
    • Start Word and select a Keyman keyboard (testing TSF integration)
    • Verify that various test sequences are output correctly
  • TEST_ON_SCREEN_KEYBOARD:

    • Click Keyman icon in Notification area, select On Screen Keyboard
    • Verify that OSK displays correctly for selected Keyman keyboard
    • Verify that typing characters by clicking on OSK produces expected output

SUITE_CAPSLOCK:

  • GROUP_WIN10
  • GROUP_WIN11

Caps Lock

The test keyboard layouts are found in the keyman repo at app/windows/src/test/manual-tests/caps-lock-stores. There is a project file for the 3 keyboards used in this test. The project file can be used to build the keyboard packages, but you can conveniently use the .kmp file zipped and included respectively below.

The test cases below expect the usage of the capslock.kmp.zip keyboard. That keyboard outputs pass or fail if following the test cases.

Prerequisites before each test

  • System keyboard layout is en-US
  • Install a keyboard that doesn't use any of the caps lock stores, e.g. capslock.kmp.
  • CapsLock is currently on
  • Currently active keyboard is the capslock.kmp keyboard

Test cases

click to expand
  • TEST_CAPSLOCK-1: uppercase with virtual key

    • press and release a

    Expected result:

    • pass. (with other keyboards uppercase A)
  • TEST_CAPSLOCK-2: lowercase with virtual key

    • press and hold 'Shift'
    • press and release b
    • release Shift

    Expected result:

    • pass. (with other keyboards lowercase b)
  • TEST_CAPSLOCK-3: capslock ignored for numbers

    • press and hold 'Shift'
    • press and release 3
    • release Shift

    Expected result:

    • pass. (with other keyboards #)
  • TEST_CAPSLOCK-4: uppercase

    • press and release c

    Expected result:

    • pass. (with other keyboards uppercase C)
  • TEST_CAPSLOCK-5: lowercase

    • press and hold 'Shift'
    • press and release d
    • release Shift

    Expected result:

    • pass. (with other keyboards lowercase d)

CapsAlwaysOff

For these tests, use a keyboard with the caps_always_off.kmp.zip store set. We call this keyboard capsalwaysoff below.

Any keyboard with that store set will work; if you don't have one at hand you can use the caps_always_off.kmp keyboard. The caps_always_off.kmp keyboard will prevent switching caps lock on. As a sanity check to verify that Keyman is actually active, pressing the key a will output ncaps_little_a, and Shift+a will output ncaps_shift_A.

Note: When testing in a virtual machine, use an on-screen keyboard (in VirtualBox: Input/Keyboard/Soft Keyboard) and observe the caps lock indicator of the on-screen keyboard. Using the hardware keyboard might show side effects with caps lock.

Prerequisites before each test

  • Install a keyboard that has CapsAlwaysOff store set, e.g. caps_always_off.kmp.
  • CapsLock is currently off
  • Currently active keyboard is a non-Keyman keyboard

Test cases

click to expand
  • TEST_CAPSOFF-1: sanity check

    • switch to capsalwaysoff keyboard
    • press and release a

    Expected result:

    • output: ncaps_little_a
  • TEST_CAPSOFF-2: caps lock stays off

    • switch to capsalwaysoff keyboard
    • press and release CapsLock key
    • press and release a

    Expected result:

    • caps lock indicator stays turned off
    • output: ncaps_little_a
  • TEST_CAPSOFF-3: no caps lock while holding capslock key

    • switch to capsalwaysoff keyboard
    • press and hold CapsLock key
    • press and release a
    • release CapsLock key

    Expected result:

    • output: ncaps_little_a
  • TEST_CAPSOFF-4: no caps lock while holding capslock key

    • switch to capsalwaysoff keyboard
    • press and hold CapsLock key
    • press and hold Shift key
    • press and release a
    • release CapsLock and Shift keys

    Expected result:

    • output: ncaps_shift_A
  • TEST_CAPSOFF-5: switching turns off caps lock

    • turn on caps lock
    • switch to capsalwaysoff keyboard
    • press and release a

    Expected result:

    • caps lock indicator turned off
    • output: ncaps_little_a

SHIFT: CapsOnOnly/ShiftFreesCaps

For these tests, use a keyboard with the CapsOnOnly and ShiftFreesCaps stores set. We call this keyboard shift_frees_caps below.

Any keyboard with these stores set will work; if you don't have one at hand you can use the shift_frees_caps.kmp.zip keyboard.

The shift_frees_caps.kmp keyboard will enable caps lock by pressing the CapsLock key, and will turn capslock off by pressing the Shift key. The keyboard outputs pass or fail if following the test cases.

Note: When testing in a virtual machine, use an on-screen keyboard (in VirtualBox: Input/Keyboard/Soft Keyboard) and observe the caps lock indicator of the on-screen keyboard. Using the hardware keyboard might show side effects with caps lock. Except for TEST_CAPSONLY-5 which can only be reliably tested on a hardware keyboard on host OS (not a VM). For windows 10 and windows 11 with a virtual box vm-onscreen keyboard, the following happens. The VM soft keyboard does NOT actually send the Shift Shift Key Stroke through but rather will change the keys pressed for example if an a is pressed the soft keyboard itself will change that key to a A. This means we can't Test TEST_CAPONLY-5 on a soft keyboard.

Prerequisites before each test

  • Install a keyboard that has the CapsOnOnly and ShiftFreesCaps stores set, e.g.
    shift_frees_caps.kmp.
  • CapsLock is currently off
  • Currently active keyboard is shift_frees_caps keyboard

Test cases

click to expand
  • TEST_CAPSONLY-1: no caps

    • press and release 1

    Expected result:

    • output: pass.
  • TEST_CAPSONLY-2: caps

    • press and release CapsLock
    • press and release 2

    Expected result:

    • caps lock indicator turned on
    • output: pass.
  • TEST_CAPSONLY-3: caps doesn't toggle

    • press and release CapsLock
    • press and release CapsLock
    • press and release 6

    Expected result:

    • caps lock indicator turned on
    • output: pass.
  • TEST_CAPSONLY-4: shift turns off

    • press and release CapsLock
    • press and hold Shift
    • press and release 3
    • release Shift

    Expected result:

    • caps lock indicator turned off
    • output: pass.
  • TEST_CAPSONLY-5: shift by itself turns off
    Be aware of limitations when testing this on virtual machines as noted above.

    • press and release CapsLock
    • press and release Shift

    Expected result:

    • caps lock indicator turned off
    • (no output)

SUITE_TSF_APP:

Background: Some windows applications use the windows TSF these include: MS Word, Firefox, Fieldworks and the windows search field on the taskbar.

Setup Text Services Framework(TSF) testing with Keyman for Windows

  1. Install Keyman Developer version 15 or greater.

  2. Open the Keyman Developers Test page in Firefox. It must be Firefox Browser

    i. By default this is at localhost:8008 so you could type this location in to the firefox address bar.

    ii. You can also access it by pressing the Test package on web button found in the Compile tab for any keyboard package.

  3. On the Keymand Developer Keyboard Test Page use the Keyboard dropdown to select system keyboard

  4. Use the Keyman for Windows icon located in the System Tray to select the desired Keyman for the Windows keyboard.
    system_tray

  5. Typing text into the input field will now use the TSF with the keyboard selected in step 4.

Test cases: double processing

click to expand

To run these tests the EuroLatin (SIL) Keyboard from here.

  • GROUP_WIN10

  • GROUP_WIN11

  • TEST_DOUBLE_PROCESSING_FIREFOX:

    1. Follow steps 1-4 from Setup Text Services Framework(TSF) testing with Keyman for Window above selecting the EuroLatin Keyboard at step 4.
    2. Select the EuroLatin Keyboard
    3. Type in to the windows search bar a b c d Backspace
    4. Expected result is abc
  • TEST_DOUBLE_PROCESSING_SEARCHBAR:

    1. Start Keyman
    2. Select the EuroLatin Keyboard
    3. Type in to the windows search bar a b c d Backspace
    4. Expected result is abc

    Search_bar

  • TEST_DOUBLE_PROCESSING_NOTEPAD:

    1. Open Notepad
    2. Start Keyman
    3. Select the EuroLatin Keyboard
    4. Type a sequence of letters a b c d
    5. Expected result: abcd

SUITE_IMX_KEYBOARDS

Test IMX keyboards still work after core integration. see tests suite on #5936 and also #6187

This is the keyboard to be tested. imsample.zip
If an IMTest keyboard is already installed you will need to uninstall it first, restart windows and then install the Imsample keyboard attached to this PR.

I have copied the tests from #5936 and made a few modifications.
The overall test we are aiming for is that in doing the tests below the keyboard does not cause a keyman or app crash.

  • GROUP_WIN10
  • GROUP_WIN11

Test cases

click to expand

IMSAMPLE_KEYBOARD_INLINE_MENU:

This keyboard uses the letters aeom to allow IMX input. This keyboard is a bit flakey being a demo and not polished.
It also takes some setting up the following registry keys need to be added and set once installed.
The location of the registry keys are at.
Computer\HKEY_CURRENT_USER\SOFTWARE\Keyman\Keyman Engine\Active Keyboards\imsample
and are of type REG_DWORD
The keys are ShowIMWindow and ShowIMWindowAlways they both need to be set to 0.

In this mode IM window is not shown rather the app text is updated with a menu when either aeom is pressed.
For example when type he the text will become h[1ɛ 2ɜ 3ə 4e 5ɘ] then you type the number 3 the text displayed should now be

  • TEST_IMSAMPLE_INPUT:

    • Install Imsample keyboard attached to this PR.
    • Select the keyboard its name is IMTest
    • Type some keys that are not the special keys e.g. t r y
      • Type the space key then a then type 1 to get the 1st option
    • Expected Result: try æ
    • continue to the next test
  • TEST_IMSAMPLE_INPUT_CONT:
    ... contd from above

    • Type 'm' and type 3 to get ### option
    • Expected Result: try æ###
  • TEST_IMSAMPLE_BACKSPACE:
    Using Notepad or Libreoffice

    • Type f
    • Type e
    • The screen should have f[1ɛ 2ɜ 3ə 4e 5ɘ]
    • Now press Backspace. the whole option menu including the square brackets [ ] should be deleted.
    • Expected result f

IMSAMPLE_KEYBOARD_IM_WINDOW:

This keyboard uses the letters aeom to allow IMX input. This time a IM window should display.
image

The first time you use the keyboard with an application the registry keys will be created and by default set to 1.

If the IM window is not appearing you will need to verify the value of two registry keys.
The location of the registry keys are at.
Computer\HKEY_CURRENT_USER\SOFTWARE\Keyman\Keyman Engine\Active Keyboards\imsample
and are of type REG_DWORD
The keys are ShowIMWindow and ShowIMWindowAlways they both need to be set to 1.

Note for the IM window you need to use the mouse pointer to select the options, you can't type the number.

  • TEST_IMSAMPLE_INPUT_IMW:

    • Install Imsample keyboard attached to this PR (if not done already)
    • Select the keyboard its name is IMTest
    • Type some keys that are not the special keys e.g. t r y
    • Type the space key then a then click the 1st option
    • Expected Result: try æ
    • continue to the next test
  • TEST_IMSAMPLE_INPUT_IMW_CONT:
    ... contd from above

    • Type 'm' and select the 3rd ### option
    • Expected Result: try æ###

SIMPLIFIED_CHINESE:

This keyboard will display the IMX window as soon as a string the matches the pinyin for one or more characters are typed.

For all these tests install the Simplified Chinese Keyboard cs-pinyin.cmp found here

  • TEST_SIMPLIFIED_CHINESE_SINGLE:
    Using Notepad or equivalent.

    • Type o - The IMX window should appear
    • Choose the 4th option
    • Expected result: 喔
  • TEST_SIMPLIFIED_CHINESE_MULTIPLE:
    Using Notepad or equivalent.

    • Type h a n z i - The IMX window will appear and in the top left the letters hanzi will be present
    • Choose the 5th option
    • Expected result: 汉字变换
  • TEST_SIMPLIFIED_CHINESE_BACKSPACE_1:
    Using Notepad or equivalent.
    This is to test the backspace occurring mid pinyin sequence before a character is output to the app

    • Type h a n z i - The IMX window will appear and in the top left the letters hanzi will be present
    • Press Backspace twice - The IMX window should now have the top left letters of han.
    • Choose the 5th option
    • Expected result: 汗
  • TEST_SIMPLIFIED_CHINESE_BACKSPACE_2:
    Using Notepad or equivalent.
    This is to test the backspace of already output characters.

    • Type h a n z i - The IMX window will appear and in the top left the letters hanzi will be present.
    • Choose the 5th option
    • Expected result: 汉字变换
    • Press Backspace twice
    • Expected result: 汉字

SUITE_STORE_AND_CONTEXT

Test the options keyboard stores and context updating as a result of keystroke input. Introduced after #7077 and #7809 there are more tests on those PRs.

  • GROUP_WIN10
  • GROUP_WIN11

Test cases

click to expand

The key referred to as "enter" is alternatively labelled "return" on some keyboards.

Keyboards for the following test are found in the zip file store_context_kbd.zip

TEST_21_OPTION_STORE:

  1. Install 021 - options.kmx
  2. Open Notepad
  3. Select 021-options.kmx as the current keyboard.
  4. Type a1a0a

Expected Result: "no foo.foo.no foo"

TEST_OUTPUT_KEYSTROKE

  1. Install 043 - output and keystroke.kmx
  2. Open Notepad
  3. Select 043 - output and keystroke.kmx as the current keyboard.
  4. Type 123

Expected Result: "abd3"

TEST_OUTPUT_KEYSTROKE_INVALID_CONTEXT

  1. If not installed from the previous test - Install 043 - output and keystroke.kmx
  2. Open Notepad
  3. Select 043 - output and keystroke.kmx as the current keyboard.
  4. Type 12Enter3

Expected Result:
"abc
3"

TEST_DEADKEY_AND_CONTEXT

  1. Install 045 - deadkey and context.kmx
  2. Open Notepad
  3. Select 045 - deadkey and context.kmx as the current keyboard.
  4. Type yzShift+/

Expected Result: "correct"

Removing the legacy code that was replaced by the core.
Also removing the feature flag for core integeration.
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Apr 14, 2023
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Apr 14, 2023

User Test Results

Test specification and instructions

✅ SUITE_BASELINE: Keyman for Windows Base Line Tests

10 tests in 2 groups PASSED
  • ✅ GROUP_WIN10:

    5 tests PASSED
    • TEST_INSTALL (PASSED): Tested with the attached Keyman build (17.0.87-alpha-test-8593) in Windows 10 OS and I was able to installed this build without having any problem.
    • TEST_KEYBOARD_INSTALLATION_REMOTE (PASSED): Able to install Khmer Angkor keyboard using Download Keyboard button in the Keyman Configuration dialog.
    • TEST_INSTALL_PKG_DISK (PASSED): Able to install sil_ipa.kmp file from a folder. Verified that the keyboard appears on the menu.
    • TEST_KEYBOARD_OUTPUT (PASSED): Tested with the attached PR build (17.0.87-alpha-test-8593) in Windows 10 OS and here is my observation: 1. Able to see the Khmer keyboard in both Keyman Configuration dialog as well as in the Keyman menu list in the task bar. 2. Able to type in both the keyboard using Notepad app. Seems to be working fine. (notes)
    • TEST_ON_SCREEN_KEYBOARD (PASSED): Verified that OSK displayed correctly for the selected keyboard. Able to type in the Notepad using OSK.
  • ✅ GROUP_WIN11:

    5 tests PASSED
    • TEST_INSTALL (PASSED): Tested with the attached Keyman build (17.0.87-alpha-test-8593) in Windows 11 OS (Virtual Machine) and I was able to installed this build without having any problem.
    • TEST_KEYBOARD_INSTALLATION_REMOTE (PASSED): Able to install Khmer Angkor keyboard using Download Keyboard button in the Keyman Configuration dialog.
    • TEST_INSTALL_PKG_DISK (PASSED): Able to install sil_ipa.kmp file from a folder. Verified that the keyboard appears on the menu.
    • TEST_KEYBOARD_OUTPUT (PASSED): Able to change the keyboards and type it in the relevant language in the Notepad.
    • TEST_ON_SCREEN_KEYBOARD (PASSED): Verified that OSK displayed correctly for the selected keyboard. Able to type in the Notepad using OSK.

✅ SUITE_CAPSLOCK:

30 tests in 2 groups PASSED
  • ✅ GROUP_WIN10:

    15 tests PASSED
    • TEST_CAPSLOCK-1 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSLOCK-2 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSLOCK-3 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSLOCK-4 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSLOCK-5 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSOFF-1 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
    • TEST_CAPSOFF-2 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
    • TEST_CAPSOFF-3 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
    • TEST_CAPSOFF-4 (PASSED): Verified that 'ncaps_shift_A' result shown in the Notepad.
    • TEST_CAPSOFF-5 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
    • TEST_CAPSONLY-1 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSONLY-2 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSONLY-3 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSONLY-4 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSONLY-5 (PASSED): Verified that nothing has output in the Notepad.
  • ✅ GROUP_WIN11:

    15 tests PASSED
    • TEST_CAPSLOCK-1 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSLOCK-2 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSLOCK-3 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSLOCK-4 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSLOCK-5 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSOFF-1 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
    • TEST_CAPSOFF-2 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
    • TEST_CAPSOFF-3 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
    • TEST_CAPSOFF-4 (PASSED): Verified that 'ncaps_shift_A' result shown in the Notepad.
    • TEST_CAPSOFF-5 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
    • TEST_CAPSONLY-1 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSONLY-2 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSONLY-3 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSONLY-4 (PASSED): Verified that 'pass' result shown in the Notepad.
    • TEST_CAPSONLY-5 (PASSED): Verified that nothing has output in the Notepad.

✅ SUITE_TSF_APP:

6 tests in 2 groups PASSED
  • ✅ GROUP_WIN10:

    3 tests PASSED
    • TEST_DOUBLE_PROCESSING_FIREFOX (PASSED): Verified that it shows the expected result abc
    • TEST_DOUBLE_PROCESSING_SEARCHBAR (PASSED): Verified that it shows the expected result abc
    • TEST_DOUBLE_PROCESSING_NOTEPAD (PASSED): Verified that it shows the expected result abcd
  • ✅ GROUP_WIN11:

    3 tests PASSED
    • TEST_DOUBLE_PROCESSING_FIREFOX (PASSED): Verified that it shows the expected result abc
    • TEST_DOUBLE_PROCESSING_SEARCHBAR (PASSED): Verified that it shows the expected result abc
    • TEST_DOUBLE_PROCESSING_NOTEPAD (PASSED): Verified that it shows the expected result abcd

🟥 SUITE_IMX_KEYBOARDS:

  • ✅ GROUP_WIN10:

    9 tests PASSED
    • TEST_IMSAMPLE_INPUT (PASSED): Verified the expected result is try æ
    • TEST_IMSAMPLE_INPUT_CONT (PASSED): Verified the expected result is æ###
    • TEST_IMSAMPLE_BACKSPACE (PASSED): Verified the expected results is f
    • TEST_IMSAMPLE_INPUT_IMW (PASSED): Verified the expected result is try æ
    • TEST_IMSAMPLE_INPUT_IMW_CONT (PASSED): Verified the expected result is æ###
    • TEST_SIMPLIFIED_CHINESE_SINGLE (PASSED): Verified the expected result is 喔
    • TEST_SIMPLIFIED_CHINESE_MULTIPLE (PASSED): Verified the expected result is 汉字变换
    • TEST_SIMPLIFIED_CHINESE_BACKSPACE_1 (PASSED): Verified the expected result is 汗
    • TEST_SIMPLIFIED_CHINESE_BACKSPACE_2 (PASSED): Verified the expected result is 汉字
  • 🟥 GROUP_WIN11:

    • 🟥 TEST_IMSAMPLE_INPUT (FAILED): Installed the imsample keyboard in Windows 11 OS (VM) . Noticed that after pressing 1 or choosing the 1 from the Keyman Sample IM window is showing the expected output on the Notepad. Seems to be an issue. (notes)
    • 🟥 TEST_IMSAMPLE_INPUT_CONT (FAILED): Not able to choose the letters from the Keyman Sample IM Window.
    • 🟥 TEST_IMSAMPLE_BACKSPACE (FAILED): Not able to choose the letters from the Keyman Sample IM Window.
    • 🟥 TEST_IMSAMPLE_INPUT_IMW (FAILED): Not able to choose the letters from the Keyman Sample IM Window.
    • 🟥 TEST_IMSAMPLE_INPUT_IMW_CONT (FAILED): Not able to choose the letters from the Keyman Sample IM Window.
    • 🟥 TEST_SIMPLIFIED_CHINESE_SINGLE (FAILED): I noticed that the result appears on the body of the notepad is "?" mark. But it correctly appears in the title bar of the notepad. Seems to be an issue. (notes)
    • 🟥 TEST_SIMPLIFIED_CHINESE_MULTIPLE (FAILED): The result appears on the body of the notepad is "?" mark. But it correctly appears in the title bar of the notepad. (notes)
    • 🟥 TEST_SIMPLIFIED_CHINESE_BACKSPACE_1 (FAILED): The result appears on the body of the notepad is "?" mark. But it correctly appears in the title bar of the notepad. (notes)
    • 🟥 TEST_SIMPLIFIED_CHINESE_BACKSPACE_2 (FAILED): The result appears on the body of the notepad is "?" mark. But it correctly appears in the title bar of the notepad. (notes)

✅ SUITE_STORE_AND_CONTEXT:

8 tests in 2 groups PASSED
  • ✅ GROUP_WIN10:

    4 tests PASSED
    • TEST_21_OPTION_STORE (PASSED): Verified the expected result shown 'no foo.foo.no foo' in the Notepad.
    • TEST_OUTPUT_KEYSTROKE (PASSED): Verified the expected result is 'abcd3'
    • TEST_OUTPUT_KEYSTROKE_INVALID_CONTEXT (PASSED): Verified the expected result is (notes)
    • TEST_DEADKEY_AND_CONTEXT (PASSED): Verified the expected result is 'correct'
  • ✅ GROUP_WIN11:

    4 tests PASSED
    • TEST_21_OPTION_STORE (PASSED): Verified the expected result shown 'no foo.foo.no foo' in the Notepad.
    • TEST_OUTPUT_KEYSTROKE (PASSED): Verified the expected result is 'abcd3'
    • TEST_OUTPUT_KEYSTROKE_INVALID_CONTEXT (PASSED): Verified the expected result is (notes)
    • TEST_DEADKEY_AND_CONTEXT (PASSED): Verified the expected result is 'correct'
Retesting Template
@keymanapp-test-bot retest SUITE_IMX_KEYBOARDS GROUP_WIN11 TEST_IMSAMPLE_INPUT TEST_IMSAMPLE_INPUT_CONT TEST_IMSAMPLE_BACKSPACE TEST_IMSAMPLE_INPUT_IMW TEST_IMSAMPLE_INPUT_IMW_CONT TEST_SIMPLIFIED_CHINESE_SINGLE TEST_SIMPLIFIED_CHINESE_MULTIPLE TEST_SIMPLIFIED_CHINESE_BACKSPACE_1 TEST_SIMPLIFIED_CHINESE_BACKSPACE_2

Test Artifacts

RefreshPreservedKeys(TRUE);
return TRUE;
// happy to use while(!done) pattern
fail:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realised there was previously a possible memory leak here in not deleting _td_>lpActiveKeyboard I am using a goto here. If we don't like that I could maybe use while(!done) {} instead

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM although see my comment about removing Keyman_ForceKeyboard and Keyman_StopForcingKeyboard altogether 😁

@rc-swag rc-swag marked this pull request as ready for review April 20, 2023 11:30
@bharanidharanj
Copy link

bharanidharanj commented Apr 20, 2023

SUITE_BASELINE: Keyman for Windows Base Line Tests

GROUP_WIN10:

  • TEST_INSTALL (PASSED): Tested with the attached Keyman build (17.0.87-alpha-test-8593) in Windows 10 OS and I was able to installed this build without having any problem.
  • TEST_KEYBOARD_INSTALLATION_REMOTE (PASSED): Able to install Khmer Angkor keyboard using Download Keyboard button in the Keyman Configuration dialog.
  • TEST_INSTALL_PKG_DISK (PASSED): Able to install sil_ipa.kmp file from a folder. Verified that the keyboard appears on the menu.

@bharanidharanj
Copy link

SUITE_BASELINE: Keyman for Windows Base Line Tests

GROUP_WIN10:

  • TEST_KEYBOARD_OUTPUT (FAILED): I noticed that the installed 'khmer angkor' keyboard was missing the in the Keyman menu even though it appears on the Keyman Configuration dialog. Seems to be an issue.

  • TEST_ON_SCREEN_KEYBOARD (PASSED): Verified that OSK displayed correctly for the selected keyboard. Able to type in the Notepad using OSK.

Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I wonder if there are other functions we can cleanup as a result of this (e.g. extended string management, etc). But those can come as separate work.

LoadDLLs(&_td->lpKeyboards[i]);

LoadKeyboardOptions(&_td->lpKeyboards[i]);
LoadKeyboardOptionsREGCore(&_td->lpKeyboards[i], _td->lpKeyboards[i].lpCoreKeyboardState);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why you didn't rename this LoadKeyboardOptionsREGCore given you renamed LoadlpKeyboardCore to LoadlpKeyboard?

Copy link
Contributor Author

@rc-swag rc-swag May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. The LoadlpKeyboardCore was more about distinguishing it from the legacy equivalent function. The LoadKeyboardOptionsREGCore is more about loading registry options to Core. However, it made me think and go over all the functions with Core. I will create PR to clean this up. #8703

@@ -385,9 +380,6 @@ void Globals::SetBaseKeyboardFlags(char *baseKeyboard, BOOL simulateAltGr, BOOL
be changed until Keyman is restarted.
*/
BOOL Globals::InitSettings() {
/* Check for common core vs windows core */
f_CoreIntegration = Reg_GetDebugFlag(REGSZ_Flag_UseKeymanCore, TRUE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constant REGSZ_Flag_UseKeymanCore should also be deleted from the relevant .h file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh missed that thanks

RefreshPreservedKeys(TRUE);
return TRUE;
// happy to use while(!done) pattern
fail:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM although see my comment about removing Keyman_ForceKeyboard and Keyman_StopForcingKeyboard altogether 😁

Comment on lines 563 to 564
_td->lpActiveKeyboard->IMDLLs = NULL;
_td->lpActiveKeyboard->KeyboardOptions = NULL;*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get rid of this commented code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a follow-up PR, I think we should remove Keyman_ForceKeyboard altogether. It's totally legacy now, as anyone wanting to use a keyboard directly should host Keyman Core (as Keyman Developer Debugger does). We only use it in some really old manual tests (I checked) -- which we can leave alone at present.

That will be MUCH tidier, because the whole messy ownership of _td->lpActiveKeyboard problem goes away.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See Issue #8646

@mcdurdin
Copy link
Member

mcdurdin commented Apr 21, 2023

I think we can remove LPKEYBOARD Keyboard; from tagINTKEYBOARDINFO in keymanengine.h, along with deleting legacy_kmx_memory.h altogether, yes? And that should filter out a bunch of other obsolete bits and pieces I think? Should we also be removing all references to legacy_kmx_file.h?

@mcdurdin
Copy link
Member

addins.cpp/addins.h should also be deleteable I think

@bharanidharanj
Copy link

bharanidharanj commented Apr 21, 2023

SUITE_CAPSLOCK:

GROUP_WIN10:

  • TEST_CAPSLOCK-1 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSLOCK-2 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSLOCK-3 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSLOCK-4 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSLOCK-5 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSOFF-1 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
  • TEST_CAPSOFF-2 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
  • TEST_CAPSOFF-3 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
  • TEST_CAPSOFF-4 (PASSED): Verified that 'ncaps_shift_A' result shown in the Notepad.
  • TEST_CAPSOFF-5 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
  • TEST_CAPSONLY-1 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSONLY-2 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSONLY-3 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSONLY-4 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSONLY-5 (PASSED): Verified that nothing has output in the Notepad.

@@ -252,13 +252,9 @@ LRESULT _kmnGetMessageProc(int nCode, WPARAM wParam, LPARAM lParam)
Handle WM_UNICHAR messages for RichEdit control -- should we test RichEdit version?
*/

if(mp->message == WM_UNICHAR && Addin_ShouldProcessUnichar(mp->hwnd))
if(mp->message == WM_UNICHAR)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcdurdin I blindly removed addins - I don't know what they did. Should WM_UNICHAR be removed totally as it seems addins was the only function interested in the event. ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think WM_UNICHAR is very much dead at this point. But perhaps it should be removed entirely in a separate PR (and also remove Keyman_ForceKeyboard in a separate PR too) -- that way we have PR# to reference them for potential future questions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR for removing WM_UNICHAR #8677

@bharanidharanj
Copy link

SUITE_TSF_APP:

GROUP_WIN10:

  • TEST_DOUBLE_PROCESSING_FIREFOX (PASSED): Verified that it shows the expected result abc

  • TEST_DOUBLE_PROCESSING_SEARCHBAR (PASSED): Verified that it shows the expected result abc

  • TEST_DOUBLE_PROCESSING_NOTEPAD (PASSED): Verified that it shows the expected result abcd

@bharanidharanj
Copy link

SUITE_IMX_KEYBOARDS:

GROUP_WIN10:

  • TEST_IMSAMPLE_INPUT (PASSED): Verified the expected result is try æ
  • TEST_IMSAMPLE_INPUT_CONT (PASSED): Verified the expected result is æ###
  • TEST_IMSAMPLE_BACKSPACE (PASSED): Verified the expected results is f
  • TEST_IMSAMPLE_INPUT_IMW (PASSED): Verified the expected result is try æ
  • TEST_IMSAMPLE_INPUT_IMW_CONT (PASSED): Verified the expected result is æ###
  • TEST_SIMPLIFIED_CHINESE_SINGLE (PASSED): Verified the expected result is 喔
  • TEST_SIMPLIFIED_CHINESE_MULTIPLE (PASSED): Verified the expected result is 汉字变换
  • TEST_SIMPLIFIED_CHINESE_BACKSPACE_1 (PASSED): Verified the expected result is 汗
  • TEST_SIMPLIFIED_CHINESE_BACKSPACE_2 (PASSED): Verified the expected result is 汉字

@bharanidharanj
Copy link

SUITE_STORE_AND_CONTEXT:

GROUP_WIN10:

  • TEST_21_OPTION_STORE (PASSED): Verified the expected result shown 'no foo.foo.no foo' in the Notepad.
  • TEST_OUTPUT_KEYSTROKE (PASSED): Verified the expected result is 'abcd3'
  • TEST_OUTPUT_KEYSTROKE_INVALID_CONTEXT (PASSED): Verified the expected result is
    abc
    3
  • TEST_DEADKEY_AND_CONTEXT (PASSED): Verified the expected result is 'correct'

@bharanidharanj
Copy link

SUITE_BASELINE: Keyman for Windows Base Line Tests

GROUP_WIN11:

  • TEST_INSTALL (PASSED): Tested with the attached Keyman build (17.0.87-alpha-test-8593) in Windows 11 OS (Virtual Machine) and I was able to installed this build without having any problem.
  • TEST_KEYBOARD_INSTALLATION_REMOTE (PASSED): Able to install Khmer Angkor keyboard using Download Keyboard button in the Keyman Configuration dialog.
  • TEST_INSTALL_PKG_DISK (PASSED): Able to install sil_ipa.kmp file from a folder. Verified that the keyboard appears on the menu.
  • TEST_KEYBOARD_OUTPUT (PASSED): Able to change the keyboards and type it in the relevant language in the Notepad.
  • TEST_ON_SCREEN_KEYBOARD (PASSED): Verified that OSK displayed correctly for the selected keyboard. Able to type in the Notepad using OSK.

@bharanidharanj
Copy link

SUITE_CAPSLOCK:

GROUP_WIN11:

  • TEST_CAPSLOCK-1 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSLOCK-2 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSLOCK-3 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSLOCK-4 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSLOCK-5 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSOFF-1 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
  • TEST_CAPSOFF-2 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
  • TEST_CAPSOFF-3 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
  • TEST_CAPSOFF-4 (PASSED): Verified that 'ncaps_shift_A' result shown in the Notepad.
  • TEST_CAPSOFF-5 (PASSED): Verified that 'ncaps_little_a' result shown in the Notepad.
  • TEST_CAPSONLY-1 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSONLY-2 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSONLY-3 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSONLY-4 (PASSED): Verified that 'pass' result shown in the Notepad.
  • TEST_CAPSONLY-5 (PASSED): Verified that nothing has output in the Notepad.

@mcdurdin mcdurdin added this to the A17S12 milestone May 5, 2023
Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-approving

// TODO: 5442 will remove these once windows core is deprecated
BOOL StopOutput;
int LoopTimes;
// TODO: 5442
WORD vkey; // I934
WCHAR charCode; // I4582
BOOL windowunicode; // I4287
BOOL isDown;
LPKEYBOARD lpkb;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed now?

@mcdurdin mcdurdin modified the milestones: A17S12, A17S13 May 14, 2023
rc-swag and others added 6 commits May 15, 2023 10:25
windows/src/engine/keyman32/K32_load.cpp Outdated Show resolved Hide resolved
rc-swag and others added 2 commits May 17, 2023 10:27
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
@rc-swag
Copy link
Contributor Author

rc-swag commented May 17, 2023

The failed tests fail currently on Windows 11 with Keyman 15 and up. #8697 has been created to deal with this. Therefore can merge this PR.

@rc-swag rc-swag merged commit 543a1de into master May 17, 2023
3 of 4 checks passed
@rc-swag rc-swag deleted the chore/windows/5442/remove-legacy-keyman-core branch May 17, 2023 09:40
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 17.0.109-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

chore(windows): Remove old windows keyboard processor code once core engine regression tested
5 participants