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(web): move KeyboardProcessor.Codes into common/web/types #8146

Open
mcdurdin opened this issue Feb 2, 2023 · 3 comments · May be fixed by #12072
Open

chore(web): move KeyboardProcessor.Codes into common/web/types #8146

mcdurdin opened this issue Feb 2, 2023 · 3 comments · May be fixed by #12072
Assignees
Milestone

Comments

@mcdurdin
Copy link
Member

mcdurdin commented Feb 2, 2023

I suggest that we move codes.ts into common/web/types as a future refactor.

Originally posted by @mcdurdin in #7809 (comment)

Also, SystemStoreIDs from kbdInterface.ts

@mcdurdin mcdurdin added this to the 17.0 milestone Feb 2, 2023
@jahorton
Copy link
Contributor

An extension of this, coming out of the big namespace -> module feature branch that just landed (#8560):

@keymanapp/keyboard-processor is practically primed for a split into two components:

  • Things reasonable for common/web/types
    • keyboard layout stuff: defaults, the layout JSON -> layout object conversion process, layout-related methods
    • the Keyboard class
    • Codes
    • KeyEvent - as the OSK produces these for consumption by the rule-processor, and likely will produce for other platforms come feat(web): Core OSK module #5023. (They'd need some sort of structure for user-generated keystrokes... and this is Web's existing one.)
    • Maybe the keyboard harness / loader mechanism
      • I think this item's subject to "we could, but why?" I don't think it fits thematically. Just noting the possibility.
      • If we load a full JS keyboard, even if just as a shell for the visual-layout info, it makes sense.
      • We should be able to just pass the layout JSON at some point instead, at which point the loaders would be unnecessary for common/web.
  • Things that should stay separate
    • Generally, kmn-keyboard rule-processing.
    • KeyboardInterface (with its keyboard API funcs)
    • Web's OutputTarget & Transcription subsystems.

There may be a slight bit of work needed, but I remember noticing how split-friendly the package's organization & contents were while converting KMW to its now-ES-module-based form.

@mcdurdin mcdurdin modified the milestones: 17.0, 18.0 Jul 7, 2023
@jahorton
Copy link
Contributor

jahorton commented Jul 7, 2023

#8056 made related changes in preparation for this - it was made at the time I identified the potential split and started more actively preparing for it.

@ermshiperete
Copy link
Contributor

After discussion moving to A18S7 when @mcdurdin is scheduled to be back.

ermshiperete added a commit that referenced this issue Jul 26, 2024
Also add some trivial unit tests for `Codes` to satisfy coverage
threshold.

Fixes: #8146
ermshiperete added a commit that referenced this issue Jul 29, 2024
Also add some trivial unit tests for `Codes` to satisfy coverage
threshold.

Fixes: #8146
ermshiperete added a commit that referenced this issue Jul 30, 2024
Also add some trivial unit tests for `Codes` to satisfy coverage
threshold.

Fixes: #8146
ermshiperete added a commit that referenced this issue Aug 1, 2024
Note that this adds the keyCodes > 50000 to `USVirtualKeyCodes`.

Fixes: #8146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment