-
Notifications
You must be signed in to change notification settings - Fork 387
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
CLDR-17113 kbd: element/attr renaming #3313
Conversation
needs spec yet |
f067074
to
85553c4
Compare
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor typo apart from that lgtm
docs/ldml/tr35-keyboards.md
Outdated
<key id="a" to="a" longpress="\u{0301} \u{0300}" /> | ||
<key id="shift" switch="shift" /> | ||
<key id="a" output="a" longpress="\u{0301} \u{0300}" /> | ||
<key id="shift" layerId="shift" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: a limitation of longpress is we can't do e.g. longpress="ctrl"
to get to the ctrl layer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One way to solve this if needed would be to make the longpress
refer to key ids
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would certainly be elegant structurally, but it would then require another lot of key elements to do the mapping to outputs, and those keys would not be able to have longpress themselves, etc. Would require a significant reshuffle of the current design.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They could. Longpress keys could be switching layers, and - if the options are presented in the UI - have multi tap, flicks or more longpress keys (nobody says the UI must dismiss as soon as you touch it) or assigned a display
element. Implementations can simply not support it. I am not sure you need that much structural redesign, but also I am not sure how useful this would be and the cost of that is more verbosity in the xml, hence emphasis on "if needed".
Compare this with multi tap situation. In this case, if you wanted to allow layer switching keys or long press keys, then you need significant implementation redesign as things change under your hands, and allowing "nested" multi tap does not make sense in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My feeling on this is: layering gestures on gestures would lead to significant implementation complexity, a big decrease in usability and discoverability, and very little additional benefit.
As far as I can tell, only the layerId
attribute is important as an attribute for any gesture outputs. But if we did refactor in this way, then it would be nice to also specify the longPressDefault
as an attribute of the longPress rather than the pattern we have right now <longPress default='true'>
.
@DavidLRowe noted that there are extant examples of keyboards in the Keyman keyboards repository that have layerId-type actions assigned to longpress. My quick and somewhat rough search located at least 81 keyboards. There are two kinds of uses:
-
Keyboards that have a modifier key with additional layer switch keys in the longpress, e.g. koreguaje. As far as I have checked, these are mostly translations from desktop layouts.
-
Keyboards that emit an output and then swap to another layer. This pattern is widely used, e.g. in naijatype. This is an important usability pattern -- and restricting that ability to base keys seems like a poor outcome.
Given the current restriction we have with CLDR's XML structure, supporting this would lead to significantly more verbose files.
Is it too late to be shuffling these deck chairs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe for consistency, the flick output should also be a key.
That would allow <display>
to affect flick output.
Is it too late to be shuffling these deck chairs?
I think the too-late ship has already sailed in a sense, that we're already renaming elements.
I'll update.
38b0e70
to
c1e301d
Compare
85553c4
to
27c1703
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
737e061
to
6ff581a
Compare
796a858
to
0e4f793
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
6bac734
to
a1a8612
Compare
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
- longPress, multiTap now use a new keyList id - keyList is a list of keys, has a default key - flickSegment now uses a keyId instead of output This means that each part of longPress, flick, and multiTap can: - have a <display> customization - perform a layer switch if desired Also, document.
f797242
to
24f19c8
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Not sure I quite understand |
It's moving the existing Further discussion on this change is probably worthwhile: Pros:
Cons:
|
Maybe this should be done in a separate PR, it's getting a bit crowded. The PR now has <keyList id="lower-a" defaultKeyId="a-grave" keyIds="a-grave a-caret a-acute a-umlaut a-tilde a-ring a-caron" /> You said it's moving from |
Maybe I messed up the pr
separate PR
Actually they are very intertwined. I’d rather not create too many , and
this change is relevant
|
I see now what was meant. Why is that better than having |
I can see that— that also means implementations don't need to enforce "only one default". I think the longPress list of a key should be able to include itself, right? |
- replaces longPressDefault=true
@miloush PTAL |
also i should have done this before, but i disabled the |
I don't expect keyman to support nested long presses but as spec goes that sounds fine. |
It's not that the long press is nested. It's that long pressing on a key |
I think the spec should note that implementations are not expected to support nested long press (or other gestures), otherwise authors will depend on this behaviour and be disappointed. |
Noted PTAL |
docs/ldml/tr35-keyboards.md
Outdated
@@ -666,6 +666,8 @@ _Attribute:_ `longPressKeyIds="{list of key ids}"` (optional) | |||
> | |||
> In a list of keys specified by `longPressKeyIds`, the key matching `longPressDefaultKeyId` attribute (if present) specifies the default long-press target, which could be different than the first element. It is an error if the `longPressDefaultKeyId` key is not in the `longPressKeyIds` list. | |||
> | |||
> Gestures are not nested: other gestures (such as flick, multiTap, longPress) are ignored on the keys in the `longPressKeyIds` list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like before, do not use "are" and similar factual statements. It is unclear who they target and what they mean. Say "Implementations may ignore/not support" or shall not or whatever is appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well put. I will revise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
I see you went with an implementation supporting these to be non-conforming... :-) |
Two PRs that were merged to main (45) instead of maint-44 ----- - CLDR-17113 kbd: element/attr renaming (#3313) * CLDR-17113 kbd: element/attr renaming - layers/@Form > layers/@formid - key/@flicks > key/@flickId - key/@switch > key/@layerId - key/@to > key/@output - display/@to > display/@output - updates to dtd, samples - drop some old data in tests * CLDR-17113 kbd display output= and display= should support variables * CLDR-17113 kbd shuffle element deck chairs - longPress, multiTap now use a new keyList id - keyList is a list of keys, has a default key - flickSegment now uses a keyId instead of output This means that each part of longPress, flick, and multiTap can: - have a <display> customization - perform a layer switch if desired Also, document. * CLDR-17113 kbd: move keyList back into attributes * CLDR-17113 kbd: add longPressDefaultKeyId - replaces longPressDefault=true * CLDR-17113 kbd: no nested gestures * CLDR-17113 kbd: no nested gestures,2 (cherry picked from commit 5f1d298) ----- - CLDR-17140 kbd: specify modifier matching (#3314) * CLDR-17140 kbd: specify modifier matching * CLDR-17140 kbd: rename modifier= to modifiers= * CLDR-17140 kbd: modifiers: add 'other' and comma - now supports modifier 'other' if nothing else matches - now supports comma-separated lists of modifier sets - attribute name "modifier" changed to "modifiers" * CLDR-17140 kbd: remove extraneous mention of duplicate keys - per review * CLDR-17140 kbd: modifiers review comments (cherry picked from commit 286a10b)
Two PRs that were merged to main (45) instead of maint-44 ----- - CLDR-17113 kbd: element/attr renaming (#3313) * CLDR-17113 kbd: element/attr renaming - layers/@Form > layers/@formid - key/@flicks > key/@flickId - key/@switch > key/@layerId - key/@to > key/@output - display/@to > display/@output - updates to dtd, samples - drop some old data in tests * CLDR-17113 kbd display output= and display= should support variables * CLDR-17113 kbd shuffle element deck chairs - longPress, multiTap now use a new keyList id - keyList is a list of keys, has a default key - flickSegment now uses a keyId instead of output This means that each part of longPress, flick, and multiTap can: - have a <display> customization - perform a layer switch if desired Also, document. * CLDR-17113 kbd: move keyList back into attributes * CLDR-17113 kbd: add longPressDefaultKeyId - replaces longPressDefault=true * CLDR-17113 kbd: no nested gestures * CLDR-17113 kbd: no nested gestures,2 (cherry picked from commit 5f1d298) ----- - CLDR-17140 kbd: specify modifier matching (#3314) * CLDR-17140 kbd: specify modifier matching * CLDR-17140 kbd: rename modifier= to modifiers= * CLDR-17140 kbd: modifiers: add 'other' and comma - now supports modifier 'other' if nothing else matches - now supports comma-separated lists of modifier sets - attribute name "modifier" changed to "modifiers" * CLDR-17140 kbd: remove extraneous mention of duplicate keys - per review * CLDR-17140 kbd: modifiers review comments (cherry picked from commit 286a10b)
layers/@Form > layers/@formid
key/@flicks > key/@flickId
key/@switch > key/@layerId
key/@to > key/@output
display/@to > display/@output
updates to dtd, samples
drop some old data in tests
CLDR-17113
ALLOW_MANY_COMMITS=true