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): standardize interaction between OSK and physical keyboard #12836

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

sgschantz
Copy link
Contributor

@sgschantz sgschantz commented Dec 17, 2024

The OSK conforms to these rules:

  1. The state of the physical keyboard modifier keys takes precedence over the OSK modifiers
    a. If an OSK modifier such as shift is unselected, but the shift key is held down, then the OSK will display the shift layer
    b. If an OSK modifier is selected, it is reset when the corresponding physical modifier is pressed or released
  2. If the OSK is open with a modifier key selected, the modifier will be applied to a character key pressed with the physical keyboard
  3. Selected modifiers from the OSK can be combined with physical modifier keys to display a different layer in the OSK. For example with Shift selected in the OSK, if a user holds down the Option/Alt key, the shift-alt layer will be displayed in the OSK
  4. Closing the OSK resets the state of all its modifiers so that it has no effect on what is typed with the physical keyboard

Fixes #12584

User Testing

  • TEST_OSK_RESETS_ON_CLOSE: OSK modifiers are cleared when the OSK window is closed
  1. Install and run the Keyman build associated with this PR
  2. Switch to the Khmer Angkor keyboard and open the OSK
  3. Click with the mouse on the shift key of the OSK
  4. Confirm that the 'T' key on the OSK displays 'ទ'
  5. Click T on the OSK and confirm that the ouptut is 'ទ'
  6. Close the OSK
  7. Open the OSK and confirm that the shift key is no longer selected and that the 'T' key on the OSK displays 'ត'
  • TEST_OSK_SHIFT_LAYER_AFFECTS_PHYSICAL_KEYBOARD: OSK shift key affects physical typing
  1. Switch to the Khmer Angkor keyboard and open the OSK
  2. Open a note in the Stickies app
  3. Click with the mouse on the shift key of the OSK
  4. Confirm that the 'T' key on the OSK displays 'ទ'
  5. Type T on the physical keyboard and confirm that the ouptut is 'ទ'
  • TEST_OSK_SHIFT_OPTION_LAYER_AFFECTS_PHYSICAL_KEYBOARD: OSK shift-alt keys affect physical typing
  1. Switch to the Khmer Angkor keyboard and open the OSK
  2. Open a note in the Stickies app
  3. Click with the mouse on the shift and alt keys of the OSK
  4. Confirm that the 'T' key on the OSK displays '᧤'
  5. Type T on the physical keyboard and confirm that the ouptut is '᧤'
  • TEST_OSK_OPTION_LAYER_AFFECTS_PHYSICAL_KEYBOARD: OSK alt key affects physical typing
  1. Switch to the Khmer Angkor keyboard and open the OSK
  2. Open a note in the Stickies app
  3. Click with the mouse on the alt key of the OSK
  4. Confirm that the 'T' key on the OSK displays 'ឨ'
  5. Type T on the physical keyboard and confirm that the ouptut is 'ឨ'

@sgschantz sgschantz added the mac/ label Dec 17, 2024
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Dec 17, 2024

User Test Results

Test specification and instructions

  • TEST_OSK_RESETS_ON_CLOSE (PASSED) (notes)
  • TEST_OSK_SHIFT_LAYER_AFFECTS_PHYSICAL_KEYBOARD (PASSED) (notes)
  • TEST_OSK_SHIFT_OPTION_LAYER_AFFECTS_PHYSICAL_KEYBOARD (PASSED) (notes)
  • TEST_OSK_OPTION_LAYER_AFFECTS_PHYSICAL_KEYBOARD (PASSED) (notes)

Test Artifacts

@keymanapp-test-bot keymanapp-test-bot bot added this to the A18S17 milestone Dec 17, 2024
@github-actions github-actions bot added the fix label Dec 17, 2024
Base automatically changed from fix/mac/12582-sync-osk-with-keyboard to master December 17, 2024 06:54
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Dec 19, 2024
@sgschantz sgschantz marked this pull request as ready for review December 19, 2024 10:13
@sgschantz sgschantz requested a review from SabineSIL as a code owner December 19, 2024 10:13
Copy link
Contributor

@SabineSIL SabineSIL 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 Dec 19, 2024

Test Results

I tested this issue with the attached "Keyman 18.0.160-aplha-local" build on macOS Sonoma. I'm sharing my observation here.

Setup:
Installed the "Keyman 18.0.160-alpha-local" build.dmg" file
Installed the "Khmer_Angkor" keyboard.

  • TEST_OSK_RESETS_ON_CLOSE (Passed):
  1. Install the "Keyman-18.0.160.dmg file.
  2. Open the "Configuration" dialog by clicking the keyman icon.
  3. Change the keyboard from "English" to "Khmer Angkor" by clicking the keyman icon.
  4. Open the OSK by clicking the keyman icon.
  5. Click the shift key on OSK by using the mouse.
  6. Verified that the 'T' key on the OSK displays 'ទ'
  7. Open the Note app.
  8. Click the "T" on the OSK. 
  9. Verified that the output is 'ទ'
  10. Close the OSK
  11. Open the OSK
  12. Verified that the shift key is no longer selected OSK 
  13. Verified that the 'T' key on the OSK displays 'ត'
    It works well.
  • TEST_OSK_SHIFT_LAYER_AFFECTS_PHYSICAL_KEYBOARD (Passed):
  1. Change the keyboard from "English" to "Khmer Angkor" by clicking the keyman icon.
  2. Open the OSK by clicking the keyman icon.
  3. Open a note in the Stickies app
  4. Click the shift key on OSK by using the mouse.
  5. Verified that the 'T' key on the OSK displays 'ទ'
  6. Type T on the physical keyboard
  7. Verified that the output is 'ទ'
    It works well.
  • TEST_OSK_SHIFT_OPTION_LAYER_AFFECTS_PHYSICAL_KEYBOARD (Passed):
  1. Change the keyboard from "English" to "Khmer Angkor" by clicking the keyman icon.
  2. Open the OSK by clicking the keyman icon.
  3. Open a note in the Stickies app
  4. Click the shift & alt keys on OSK by using the mouse.
  5. Verified that the 'T' key on the OSK displays '᧤'
  6. Type T on the physical keyboard.
  7. Verified that the output is '᧤'
    It works great for me.
  • TEST_OSK_OPTION_LAYER_AFFECTS_PHYSICAL_KEYBOARD (Passed):
  1. Change the keyboard from "English" to "Khmer Angkor" by clicking the keyman icon.
  2. Open the OSK by clicking the keyman icon.
  3. Open a note in the Stickies app
  4. Click the alt key on OSK by using the mouse.
  5. Verified that the 'T' key on the OSK displays 'ឨ'
  6. Type T on the physical keyboard
  7. Verified that the output is 'ឨ'
    It works well. Thank you.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Dec 19, 2024
@sgschantz sgschantz merged commit b47f3a0 into master Dec 19, 2024
5 checks passed
@sgschantz sgschantz deleted the fix/mac/12584-standardize-osk branch December 19, 2024 13:04
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 18.0.162-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): standardize interaction between OSK and physical keyboard modifier keys
4 participants