Skip to content

chore(web,android): Consolidate chirality.js test keyboard to /common/test/resources/keyboards/#14989

Merged
darcywong00 merged 6 commits intomasterfrom
chore/common/consolidate-test-keyboards
Oct 28, 2025
Merged

chore(web,android): Consolidate chirality.js test keyboard to /common/test/resources/keyboards/#14989
darcywong00 merged 6 commits intomasterfrom
chore/common/consolidate-test-keyboards

Conversation

@darcywong00
Copy link
Copy Markdown
Contributor

@darcywong00 darcywong00 commented Oct 22, 2025

Addresses the chirality.js portion of #11288 where both web and Android test pages/apps are accessing the same chirality.js keyboard.

we should really avoid referencing files across projects like this (future issue)

This PR moves the handcrafted /web/src/test/manual/web/chirality/chirality.js to /common/test/resources/keyboards/chirality.js and updates the web/Android test references.

(edit)
CI currently maps /common/test/resources => resources which breaks the links the Web test pages.
So we've decided to have a web build stop cp the keyboards into a git ignored /web/build/test-resources/keyboards folder

Confusing Note

There's still a different /common/test/keyboards/chirality/build/chirality.js keyboard
that @jahorton explains in #11288 (comment)

... It's the one referenced by /common/web/keyboard-processor.

Note that the one referenced by /web/ is not the same keyboard. The one there was hand-written by me before we ever had Developer support for chiral keyboards. Granted, perhaps it may be time to replace it.

Using that second keyboard didn't work for me because:

  • the OSK on the web testing page didn't update the layer when you press the modifier keys like in the handcrafted version
  • the Android keyboardharness app didn't register keys from an external keyboard like in the handcrafted version

User Testing

Note: for modifiers:
left Ctrl + left alt = right alt
left Ctrl + left Alt + shift = right Alt + shift

  • TEST_WEB_CHIRALITY - Verifies chirality web test page functions
  1. Load the KeymanWeb test page test/manual/web/chirality/index.html (KeymanWeb Sample Page - Chirality Testing)
  2. Click in the text area
  3. Verify the OSK updates when pressing the modifiers:
    • left Ctrl
    • left Ctrl + shift
    • left Alt
    • right Alt
    • left Alt + shift
    • right Alt + shift
    • left Ctrl + left Alt (this is same as right Alt)
    • left Ctrl + left Alt + shift (this is same as right Alt + shift)
  4. Verify the keyboard outputs the corresponding key for the modifier layers
  • TEST_ANDROID_KEYBOARDHARNESS - Verifies chirality keyboard works in the KeyboardHarness test app
  1. Pair an external bluetooth keyboard to an Android device
  2. Load the PR build of the KeyboardHarness Android test app
  3. In the KeyboardHarness app, select the chirality keyboard
  4. In the KeyboardHarness app, longpress shift on the inapp keyboard to access various modifiers and verify corresponding keys are output:
    • left Ctrl
    • left Ctrl + shift
    • left Alt
    • right Alt
    • left Alt + shift
    • right Alt + shift
  5. From an external keyboard, access the some modifier layers verify corresponding keys are output

@darcywong00 darcywong00 added this to the A19S14 milestone Oct 22, 2025
@github-project-automation github-project-automation bot moved this to Todo in Keyman Oct 22, 2025
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Oct 22, 2025
Copy link
Copy Markdown
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, it's a simple cleanup, gives us an incremental improvement - can do more to consolidate the two chirality.js keyboards one day in the future.

@Meng-Heng Meng-Heng self-assigned this Oct 22, 2025
@Meng-Heng
Copy link
Copy Markdown
Contributor

Meng-Heng commented Oct 23, 2025

Test Device

  1. MacBook Pro Sequoia v15.7.1 Chrome v141.0.7390.122
  2. OPPO A60 Android v15
  3. Microsoft AZERTY bluetooth keyboard

The following results are:

Test Results

  • TEST_WEB_CHIRALITY (FAILED):
  1. Visit the Test Artifiacts (KeymanWeb Test Home)
  2. Navigate to .../src/test/manual/web/chirality/index.html
  3. Once the webpage is loaded, an error occured
    Screenshot 2568-10-22 at 3 41 31 in the afternoon
  • TEST_ANDROID_KEYBOARDHARNESS (FAILED):
  1. Connect a Bluetooth keyboard to OPPO A60
  2. Download and install the Keyboard Harness apk
  3. Launch the app, the chirality is selected when the app opens, alongisde two toast messages
    • Toast 1: /data/user/0/com.keyman.android.tests.keyboardHarness/app_data/packages..
    • Toast 2: Error in keyboardharness:chirality for language
  4. Longpress shift on the inapp keyboard, and successfully outputted the corresponding keys:
    • Left Ctrl
    • Left Ctrl + Shift
    • Left Alt
    • Right Alt
    • Left Alt + Shift
    • Right Alt + Shift
    • Left Ctrl + Left Alt
    • Left Ctrl + Left Alt + Shift
  5. From the external bluetooth keyboard, longpress shift to access various modifiers
  6. Verified:
    Status Result Keys
    Success Outputted the corresponding keys Left Ctrl Left Ctrl + Shift Left Alt Right Alt Left Alt + Shift Right Alt + Shift
    Failed No key output Left Ctrl + Left Alt Left Ctrl + Left Alt + Shift

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

re: TEST_WEB_CHIRALITY fail

Once the webpage is loaded, an error occured

ahh, the TeamCity artifacts are only set up to include /web assets, and don't include /common/test/resources/keyboards/*.js

@darcywong00
Copy link
Copy Markdown
Contributor Author

Going back to draft to sort out how to handle CI artifacts with /common/test/resources/keyboards/*.js

@darcywong00 darcywong00 marked this pull request as draft October 24, 2025 00:56
…e/common/consolidate-test-keyboards

# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
#     Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
#     Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes
@darcywong00
Copy link
Copy Markdown
Contributor Author

darcywong00 commented Oct 24, 2025

@Meng-Heng - regarding the Android fails
you can ignore the Toast errors. It's cause we're not bundling sentry on the test apps

and on the modifiers you noticed for left Ctrl + left alt; and left Ctrl + left Alt + shift, I see they're equivalent as:

Note: for modifiers:
left Ctrl + left alt = right alt
left Ctrl + left Alt + shift = right Alt + shift

I've updated the expected Android test layers

Test-bot: retest

@keymanapp-test-bot keymanapp-test-bot bot added user-test-required User tests have not been completed and removed user-test-failed labels Oct 24, 2025
@darcywong00 darcywong00 marked this pull request as ready for review October 24, 2025 04:36
@Meng-Heng
Copy link
Copy Markdown
Contributor

@darcywong00, the bluetooth keyboard at CLO is not working. On Tuesday, I'll go to NPIC to use the working one. Will that be okay?

@darcywong00
Copy link
Copy Markdown
Contributor Author

darcywong00 commented Oct 24, 2025

yep - no rush on testing.
By the way, in the past, I've also connected a USB keyboard to the phone for testing external keyboard.

@Meng-Heng
Copy link
Copy Markdown
Contributor

Meng-Heng commented Oct 28, 2025

Test Device

  • Web:
    • MacBook Pro Sequoia v15.7.1 Chrome 141.0.7390.123
    • Keyman's US Basic keyboard
  • Android:
    • OPPO A60 Android v15
    • Microsoft AZERTY bluetooth keyboard

The following results are:

Test Results

  • TEST_WEB_CHIRALITY (PASSED):
  1. Visit the Test Artifacts' KeymanWeb Test Home
  2. Navigate to .../src/test/manual/web/chirality/index.html
  3. Once the webpage is loaded, click in the text area, select the Chirality keyboard
  4. System keyboard: Keyman's US Basic keyboard
  5. Type on the OSK:
    • Verified: the layers switch according to the modifier keys pressed.
    • Verified: it outputs according to the assigned keys.
  • TEST_ANDROID_KEYBOARDHARNESS (PASSED):
  1. Connect a Bluetooth keyboard to OPPO A60
  2. Download and install the Keyboard Harness apk
  3. Launch the app, and the chirality is selected when the app opens
  4. From the OSK, longpress shift on the inapp keyboard, and successfully outputted the corresponding modifier keys:
    • Left Ctrl
    • Left Ctrl + Shift
    • Left Alt
    • Right Alt
    • Left Alt + Shift
    • Right Alt + Shift
    • Left Ctrl + Left Alt
    • Left Ctrl + Left Alt + Shift
  5. From the external bluetooth keyboard, longpress shift to access various modifiers, and successfully outputted the corresponding modifier keys:
    • Left Ctrl
    • Left Ctrl + Shift
    • Left Alt
    • Right Alt
    • Left Alt + Shift
    • Right Alt + Shift
    • Left Ctrl + Left Alt ---> Right Alt
    • Left Ctrl + Left Alt + Shift ---> Right Alt + Shift
  6. Verified: All modifier keys switch layers & output characters according to the key mapped on both an OSK & a Physical keyboard.

@keymanapp-test-bot keymanapp-test-bot bot added user-test-failed and removed user-test-required User tests have not been completed user-test-failed labels Oct 28, 2025
@darcywong00
Copy link
Copy Markdown
Contributor Author

CI build fail was for FirstVoices iOS awaiting cert renewal.

@mcdurdin
Copy link
Copy Markdown
Member

CI build fail was for FirstVoices iOS awaiting cert renewal.

We'll need to rebuild to pass checks. I've gone ahead and re-run that.

@darcywong00 darcywong00 merged commit a45e7dc into master Oct 28, 2025
18 checks passed
@darcywong00 darcywong00 deleted the chore/common/consolidate-test-keyboards branch October 28, 2025 23:42
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Oct 28, 2025
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 19.0.148-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.

4 participants