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

fix(mac): show and hide OSK consistently for all keyboards #12988

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

sgschantz
Copy link
Contributor

@sgschantz sgschantz commented Jan 22, 2025

Show and hide the OSK consistently, according to its saved state, for all keyboards (not just keyboards that include a KVK file).

Fixes #12928

User Testing

  • GROUP_IPA_SIL: Test with IPA (SIL) as the active keyboard
  • GROUP_EUROLATIN_SIL: Test with EuroLatin (SIL) as the active keyboard
  • GROUP_KHMER_ANGKOR: Test with Khmer Angkor as the active keyboard

TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_DURING_SESSION

  1. Open the OSK while using Keyman
  2. Change from Keyman to another input method such as the U.S. Keyboard provided by Apple
  3. Confirm that the OSK automatically hides
  4. Switch back to the Keyman input method
  5. Confirm that the OSK reappears

TEST_OSK_STABILITY

  1. Open the OSK while using Keyman
  2. Change between text input applications with OSK open
  3. Click on menus in the various applications
  4. Confirm that the OSK does not flicker or disappear while switching apps or using menus

TEST_OSK_REMAINS_HIDDEN_WITH_KEYMAN_INACTIVE

  1. Open the OSK while using Keyman
  2. Change from Keyman to another input method such as the U.S. Keyboard provided by Apple
  3. Switch applications and click on various menus and windows
  4. Confirm that the Keyman OSK never flashes on screen while Keyman is inactive

TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART

  1. Open the OSK while using Keyman
  2. Restart the machine
  3. Switch to the Keyman input method
  4. Confirm that the OSK appears

@sgschantz sgschantz added the mac/ label Jan 22, 2025
@sgschantz sgschantz added this to the A18S20 milestone Jan 22, 2025
@sgschantz sgschantz self-assigned this Jan 22, 2025
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Jan 22, 2025
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Jan 22, 2025

User Test Results

Test specification and instructions

  • ✅ GROUP_IPA_SIL: Test with IPA (SIL) as the active keyboard

    4 tests PASSED
    • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_DURING_SESSION (PASSED) (notes)
    • TEST_OSK_STABILITY (PASSED) (notes)
    • TEST_OSK_REMAINS_HIDDEN_WITH_KEYMAN_INACTIVE (PASSED) (notes)
    • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART (PASSED) (notes)
  • ✅ GROUP_EUROLATIN_SIL: Test with EuroLatin (SIL) as the active keyboard

    4 tests PASSED
    • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_DURING_SESSION (PASSED) (notes)
    • TEST_OSK_STABILITY (PASSED) (notes)
    • TEST_OSK_REMAINS_HIDDEN_WITH_KEYMAN_INACTIVE (PASSED) (notes)
    • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART (PASSED) (notes)
  • ✅ GROUP_KHMER_ANGKOR: Test with Khmer Angkor as the active keyboard

    4 tests PASSED
    • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_DURING_SESSION (PASSED) (notes)
    • TEST_OSK_STABILITY (PASSED) (notes)
    • TEST_OSK_REMAINS_HIDDEN_WITH_KEYMAN_INACTIVE (PASSED) (notes)
    • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART (PASSED) (notes)

Test Artifacts

@github-actions github-actions bot added the fix label Jan 22, 2025
@sgschantz sgschantz marked this pull request as ready for review January 23, 2025 01:54
@sgschantz sgschantz requested a review from SabineSIL as a code owner January 23, 2025 01:54
@sgschantz sgschantz changed the title fix(mac): osk is shown and hidden consistently for all keyboards fix(mac): show and hide OSK consistently for all keyboards Jan 23, 2025
@darcywong00
Copy link
Contributor

Should this be separate from the sentry breadcrumbs branch?

To isolate the change

@sgschantz
Copy link
Contributor Author

Should this be separate from the sentry breadcrumbs branch?

To isolate the change

I wanted to have access to the test code and logging from the other branch, just in case I needed it.

@mcdurdin mcdurdin linked an issue Jan 23, 2025 that may be closed by this pull request
@dinakaranr
Copy link

Test Results

I tested this task with the attached "keyman-18.0.175.dmg" build (23/01/2025) on macOS Sonoma.

GROUP_IPA_SIL: Test with IPA (SIL) as the active keyboard

  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_DURING_SESSION (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Added the U.S. Keyboard (English)
  3. Installed the IPA_SIL keyboard and selected it.
  4. Open the OSK while using Keyman.
  5. Verified that the IPA (SIL) OSK.
  6. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  7. Verified that the OSK automatically hides.
  8. Switch back to the Keyman input method.
  9. Verified that the OSK automatically reappears.
    It works well. Thank you.
  • TEST_OSK_STABILITY (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the IPA_SIL keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Verified that the IPA (SIL) OSK.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Change between text input applications with OSK open.
  7. Click on menus in the various applications.
  8. Verified that the OSK does not flicker or disappear while switching apps or using menus.
    It works well. Thank you.
  • TEST_OSK_REMAINS_HIDDEN_WITH_KEYMAN_INACTIVE (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the IPA_SIL keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Switch applications and click on various menus and windows.
  7. Verified that the Keyman OSK never flashes on screen while Keyman is inactive.
    It works well. Thank you.
  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART (Failed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the IPA_SIL keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Restart the machine.
  5. Verified that the Keyman OSK appeared after login. It did not hide the state after restarting the machine.
    Hence, I failed this test case. Thank you.

GROUP_EUROLATIN_SIL: Test with EuroLatin (SIL) as the active keyboard

  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_DURING_SESSION (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Added the U.S. Keyboard (English)
  3. Installed the EuroLatin (SIL) keyboard and selected it.
  4. Open the OSK while using Keyman.
  5. Verified that the EuroLatin (SIL) OSK.
  6. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  7. Verified that the OSK automatically hides.
  8. Switch back to the Keyman input method.
  9. Verified that the OSK automatically reappears.
    It works well. Thank you.
  • TEST_OSK_STABILITY (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the EuroLatin (SIL) keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Verified that the EuroLatin (SIL) OSK.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Change between text input applications with OSK open.
  7. Click on menus in the various applications.
  8. Verified that the OSK does not flicker or disappear while switching apps or using menus.
    It works well. Thank you.
  • TEST_OSK_REMAINS_HIDDEN_WITH_KEYMAN_INACTIVE (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the EuroLatin (SIL) keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Switch applications and click on various menus and windows.
  7. Verified that the Keyman OSK never flashes on screen while Keyman is inactive.
    It works well. Thank you.
  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART (Failed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the EuroLatin (SIL) keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Restart the machine.
  5. Verified that the Keyman OSK appeared after login. It did not hide the state after restarting the machine.
    Hence, I failed this test case. Thank you.

GROUP_KHMER_ANGKOR: Test with Khmer Angkor as the active keyboard

  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_DURING_SESSION (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Added the U.S. Keyboard (English)
  3. Installed the "Khmer Angkor" keyboard and selected it.
  4. Open the OSK while using Keyman.
  5. Verified that the "Khmer Angkor" OSK.
  6. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  7. Verified that the OSK automatically hides.
  8. Switch back to the Keyman input method.
  9. Verified that the OSK automatically reappears.
    It works well. Thank you.
  • TEST_OSK_STABILITY (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the "Khmer Angkor" keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Verified that the "Khmer Angkor" OSK.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Change between text input applications with OSK open.
  7. Click on menus in the various applications.
  8. Verified that the OSK does not flicker or disappear while switching apps or using menus.
    It works well. Thank you.
  • TEST_OSK_REMAINS_HIDDEN_WITH_KEYMAN_INACTIVE (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the "Khmer Angkor" keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Switch applications and click on various menus and windows.
  7. Verified that the Keyman OSK never flashes on screen while Keyman is inactive.
    It works well. Thank you.
  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART (Failed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the "Khmer Angkor" keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Restart the machine.
  5. Verified that the Keyman OSK appeared after login. It did not hide the state after restarting the machine.
    Hence, I failed this test case. Thank you.

@keymanapp-test-bot keymanapp-test-bot bot added user-test-failed and removed user-test-required User tests have not been completed labels Jan 23, 2025
@sgschantz
Copy link
Contributor Author

@dinakaranr Based on your comments, it sounds like the app behaved correctly for the failed tests. If the OSK is open before restarting the machine, then it should automatically open after you restart and switch to Keyman. Likewise, if the OSK is closed while using Keyman, it should not open after restarting and switching to Keyman. Can you please clarify?

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

@dinakaranr
Copy link

dinakaranr commented Jan 24, 2025

@sgschantz I am a little confused about the TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART scenario.
Here, I am given my observation on three ways.

  1. Select the keyman keyboard. OSK closed. restarted the machine. Here, OSK appeared automatically.
  2. Select the keyman keyboard. OSK did not close it. Restarted the machine. Here, OSK appeared automatically.
  3. Select the keyman keyboard. OSK closed. Select the English(US) system keyboard. Restart the machine. Switch the keyboard from English(US) to EuroLatin(Keyman). Here, OSK appears automatically.

I thought, I am seeing these three scenarios and is it correct for OSK behavior? Thank you.

@sgschantz
Copy link
Contributor Author

@sgschantz I am a little confused about the TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART scenario. Here, I am given my observation on three ways.

  1. Select the keyman keyboard. OSK closed. restarted the machine. Here, OSK appeared automatically.

The first case you mention is not right. I'll look into that.

to be certain that it only opens due to settings
or in response to a user action
@sgschantz
Copy link
Contributor Author

@keymanapp-test-bot retest

@dinakaranr Latest commit should resolve the issue. I'd like you to rerun all tests just to be safe. Thanks!

@keymanapp-test-bot keymanapp-test-bot bot added user-test-required User tests have not been completed and removed user-test-failed labels Jan 27, 2025
@dinakaranr
Copy link

Test Results

GROUP_IPA_SIL: Test with IPA (SIL) as the active keyboard

  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_DURING_SESSION (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Added the U.S. Keyboard (English)
  3. Installed the IPA_SIL keyboard and selected it.
  4. Open the OSK while using Keyman.
  5. Verified that the IPA (SIL) OSK.
  6. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  7. Verified that the OSK automatically hides.
  8. Switch back to the Keyman input method.
  9. Verified that the OSK automatically reappears.
  10. It works great for me. Thank you.
  • TEST_OSK_STABILITY (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the IPA_SIL keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Verified that the IPA (SIL) OSK.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Change between text input applications with OSK open.
  7. Click on menus in the various applications.
  8. Verified that the OSK does not flicker or disappear while switching apps or using menus.
  9. It works great for me. Thank you
  • TEST_OSK_REMAINS_HIDDEN_WITH_KEYMAN_INACTIVE (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the IPA_SIL keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Switch applications and click on various menus and windows.
  7. Verified that the Keyman OSK never flashes on screen while Keyman is inactive.
  8. It works great for me. Thank you.
  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the IPA_SIL keyboard and selected it.
  3. Select the keyman keyboard.
  4. Open the OSK while using Keyman.
  5. Close the OSK by clicking the X button.
  6. Restart the machine.
  7. Verified that the OSK did not appear after login to the machine.
  8. It works great for me. Thank you.

GROUP_EUROLATIN_SIL: Test with EuroLatin (SIL) as the active keyboard

  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_DURING_SESSION (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Added the U.S. Keyboard (English)
  3. Installed the EuroLatin (SIL) keyboard and selected it.
  4. Open the OSK while using Keyman.
  5. Verified that the EuroLatin (SIL) OSK.
  6. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  7. Verified that the OSK automatically hides.
  8. Switch back to the Keyman input method.
  9. Verified that the OSK automatically reappears.
  10. It works great for me. Thank you.
  • TEST_OSK_STABILITY (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the EuroLatin (SIL) keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Verified that the EuroLatin (SIL) OSK.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Change between text input applications with OSK open.
  7. Click on menus in the various applications.
  8. Verified that the OSK does not flicker or disappear while switching apps or using menus.
  9. It works great for me. Thank you.
  • TEST_OSK_REMAINS_HIDDEN_WITH_KEYMAN_INACTIVE (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the EuroLatin (SIL) keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Switch applications and click on various menus and windows.
  7. Verified that the Keyman OSK never flashes on screen while Keyman is inactive.
  8. It works great for me. Thank you.
  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the EuroLatin (SIL) keyboard and selected it.
  3. Select the keyman keyboard.
  4. Open the OSK while using Keyman.
  5. Close the OSK by clicking the X button.
  6. Restart the machine.
  7. Verified that the OSK did not appear after login to the machine.
  8. It works great for me. Thank you.

GROUP_KHMER_ANGKOR: Test with Khmer Angkor as the active keyboard

  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_DURING_SESSION (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Added the U.S. Keyboard (English)
  3. Installed the "Khmer Angkor" keyboard and selected it.
  4. Open the OSK while using Keyman.
  5. Verified that the "Khmer Angkor" OSK.
  6. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  7. Verified that the OSK automatically hides.
  8. Switch back to the Keyman input method.
  9. Verified that the OSK automatically reappears.
  10. It works great for me. Thank you.
  • TEST_OSK_STABILITY (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the "Khmer Angkor" keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Verified that the "Khmer Angkor" OSK.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Change between text input applications with OSK open.
  7. Click on menus in the various applications.
  8. Verified that the OSK does not flicker or disappear while switching apps or using menus.
  9. It works great for me. Thank you.
  • TEST_OSK_REMAINS_HIDDEN_WITH_KEYMAN_INACTIVE (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the "Khmer Angkor" keyboard and selected it.
  3. Open the OSK while using Keyman.
  4. Change from the keyboard from Keyman to the U.S. keyboard provided by Apple.
  5. Open the Pages, Strikes, and TextEdit apps.
  6. Switch applications and click on various menus and windows.
  7. Verified that the Keyman OSK never flashes on screen while Keyman is inactive.
  8. It works great for me. Thank you.
  • TEST_OSK_REMEMBERS_SHOW_HIDE_STATE_AFTER_RESTART (Passed):
  1. Installed the "keyman-18.0.175.dmg" build.
  2. Installed the "Khmer Angkor" keyboard and selected it.
  3. Select the keyman keyboard.
  4. Open the OSK while using Keyman.
  5. Close the OSK by clicking the X button.
  6. Restart the machine.
  7. Verified that the OSK did not appear after login to the machine.
  8. It works great for me. Thank you.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Jan 27, 2025
Base automatically changed from chore/mac/11623-add-breadcrumbs to master January 28, 2025 05:09
@sgschantz sgschantz merged commit 1309eb9 into master Jan 28, 2025
5 checks passed
@sgschantz sgschantz deleted the fix/mac/12928-open-osk-on-activation branch January 28, 2025 05:10
@keyman-server
Copy link
Collaborator

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

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

Successfully merging this pull request may close these issues.

bug(mac): OSK not opening on activation for some keyboards
5 participants