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

feat(developer): ldml scancodes 🙀 #9403

Closed
srl295 opened this issue Aug 2, 2023 · 10 comments · Fixed by #9615
Closed

feat(developer): ldml scancodes 🙀 #9403

srl295 opened this issue Aug 2, 2023 · 10 comments · Fixed by #9615

Comments

@srl295
Copy link
Member

srl295 commented Aug 2, 2023

Background: see CLDR-16604 and unicode-org/cldr#2929 and unicode-org/cldr#3276

  • The proposal is for the CLDR repo to not allow embedded scanCodes in a keyboard file even though the spec will support it
  • kmc should do likewise
  • also we should have unit tests that sanity check that the stock CLDR scancodes match the keyman expectations. (won't change between cldr drops)
@srl295 srl295 added this to the 17.0 milestone Aug 2, 2023
@srl295 srl295 self-assigned this Aug 2, 2023
@mcdurdin
Copy link
Member

mcdurdin commented Aug 2, 2023

warn or error? I think it's a bad idea for kmc to not accept valid ldml .xml files, isn't it?

@srl295
Copy link
Member Author

srl295 commented Aug 2, 2023

warn or error? I think it's a bad idea for kmc to not accept valid ldml .xml files, isn't it?

For kmc i think these should be errs (both the kmc and the unit test). We wouldn't expect such a keyboard to work properly in keyman.

@mcdurdin
Copy link
Member

mcdurdin commented Aug 3, 2023

It bothers me that we are building the spec in such a way that keyboards generated under it cease to be cross-platform (because if Keyman can't work it then other platforms will also be in the same boat). It seems like a backwards step to me and leads inevitably to -windows -mac -linux -... variants of keyboards, and then even worse, possibly to -windows-102, -windows-101 variants etc. Which benefits nobody.

@srl295
Copy link
Member Author

srl295 commented Aug 3, 2023

It bothers me that we are building the spec in such a way that keyboards generated under it cease to be cross-platform (because if Keyman can't work it then other platforms will also be in the same boat). It seems like a backwards step to me and leads inevitably to -windows -mac -linux -... variants of keyboards, and then even worse, possibly to -windows-102, -windows-101 variants etc. Which benefits nobody.

help me out here… how are they not cross-platform?

@srl295
Copy link
Member Author

srl295 commented Aug 3, 2023

My reading is that Keyman, like CLDR's repo, would only support keyboards defined in terms of a few standard layouts. If you had a triple keyboard with 306 keys on it, you would need to wait until that layout was added to the standard list. You could use the triple keyboard (or something else) but you would not be able to define keys not part of us/iso/abnt2/jis.

But yet, platforms are allowed to have customized layouts in their own implementations.

@mcdurdin
Copy link
Member

mcdurdin commented Aug 3, 2023

OK, so what you are saying is, the spec allows for esoteric scan code layouts which we won't support in Keyman. I guess I can live with that.

@mcdurdin
Copy link
Member

mcdurdin commented Aug 3, 2023

Although I wonder what the benefit is!

@srl295
Copy link
Member Author

srl295 commented Aug 3, 2023

OK, so what you are saying is, the spec allows for esoteric scan code layouts which we won't support in Keyman. I guess I can live with that.

That seemed to be the request, for OS specific purposes. - see CLDR links in the summary

@mcdurdin
Copy link
Member

mcdurdin commented Aug 3, 2023

for OS specific purposes

And that's what I was talking about. Why does it need to be in the spec for a single implementation's needs? It belongs as separated metadata.

@srl295
Copy link
Member Author

srl295 commented Aug 3, 2023

the standard layout belongs in the spec. I could see having a way to override that as being reasonable for the spec. But maybe we can discuss after or in adhoc. Maybe discuss this on the other PR?

@mcdurdin mcdurdin modified the milestones: 17.0, A17S19 Aug 4, 2023
@srl295 srl295 modified the milestones: A17S19, A17S20 Aug 18, 2023
@mcdurdin mcdurdin modified the milestones: A17S20, A17S21 Sep 1, 2023
@mcdurdin mcdurdin modified the milestones: A17S21, A17S22 Sep 15, 2023
srl295 added a commit that referenced this issue Sep 15, 2023
- hardware types isn't a fixed set anymore
- un-mothball the pertinent error type

Related to #9403, exposed during #9515 CLDR update
srl295 added a commit that referenced this issue Sep 22, 2023
For: #9403

- unicode-org/cldr:f16d66601f309f29a64a897282fdcab440d42661
- No local modifications neded1
srl295 added a commit that referenced this issue Sep 22, 2023
For: #9403

- read implied imports for scancodes
srl295 added a commit that referenced this issue Sep 22, 2023
For: #9403

- trying to use symbols to track import status
srl295 added a commit that referenced this issue Sep 22, 2023
For: #9403

- use Symbols to track import status
srl295 added a commit that referenced this issue Sep 22, 2023
For: #9403

- improve how forms are read in the XML structure
- warnings when custom (non-default-import) scancodes are loaded
- error, as usual, when an unknown form is present
srl295 added a commit that referenced this issue Sep 22, 2023
For: #9403

- unit test the set and row count for codes
- fix errors!
srl295 added a commit that referenced this issue Sep 25, 2023
For: #9403

- Just use a local Symbol() instead of a named one, there's no reason for a namespace here.
srl295 added a commit that referenced this issue Sep 25, 2023
For: #9403

- fix a bad comment
- Warn_UnsupportedCustomForm (formerly hint)
srl295 added a commit that referenced this issue Sep 25, 2023
For: #9403

- per review comments
- track CLDR PR 3282
srl295 added a commit that referenced this issue Sep 25, 2023
- use vkey k.K_oE2 for 0x7D in KS and JIS keyboards

For: #9403
srl295 added a commit that referenced this issue Sep 28, 2023
For: #9403

- unicode-org/cldr:2aa2275158c29e8e41c7f0b67c8fb786a453b89c
srl295 added a commit that referenced this issue Sep 28, 2023
- working on a dynamic approach, skipping this test for now

For: #9403
srl295 added a commit that referenced this issue Sep 29, 2023
- at least make sure we're using a consistent (if wrong) vkey for each scancode?

for: feat(developer): ldml scancodes 🙀  #9403
srl295 added a commit that referenced this issue Sep 29, 2023
- emit scancodes.json

for: feat(developer): ldml scancodes 🙀  #9403
srl295 added a commit that referenced this issue Sep 30, 2023
- interim step
- also re-add statically

For: #9403
srl295 added a commit that referenced this issue Sep 30, 2023
srl295 added a commit that referenced this issue Sep 30, 2023
- also fix visual keyboard compiler to use same code

For: #9403
srl295 added a commit that referenced this issue Oct 1, 2023
- spec: 'hardware' is no longer an enum but a str.
Ripple effects here.
- custom scancodes and layouts are, interestingly, supported. But it's a warning.
- tests for bad scancodes.

Fixes: #9403
@mcdurdin mcdurdin modified the milestones: A17S22, A17S23 Oct 1, 2023
srl295 added a commit that referenced this issue Oct 2, 2023
- fix casing of k_oC1
- allow vkey 226 to be doubly defined
- drop LdmlVkeyNames table and test, not needed anymore (was for vkey #7135)

Fixes: #9403
srl295 added a commit that referenced this issue Oct 2, 2023
- fixes to the special case test

Fixes: #9403
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants