-
-
Notifications
You must be signed in to change notification settings - Fork 111
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(core): support modifiers=other🙀 #11118
Conversation
- add a new value, 0x10000 to indicate 'default' For: #11072
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
…11072-default-modifier
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.
We'll need to update all the other referenced files to add a comment about DEFAULT_MODIFIER to them as well
common/include/kmx_file.h
Outdated
@@ -302,6 +302,7 @@ namespace kmx { | |||
|
|||
#define K_MODIFIERFLAG 0x007F | |||
#define K_NOTMODIFIERFLAG 0xFF00 // I4548 | |||
#define K_DEFAULTMODFLAG 0x10000 // used by KMX+ for the default modifier |
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.
Given this cannot be used in this context, as modifier flags are 16 bit in .kmx, I think this should be a comment. Also, suggest using full word rather than MOD
#define K_DEFAULTMODFLAG 0x10000 // used by KMX+ for the default modifier | |
// Note: DEFAULT_MODIFIER = 0x10000, used by KMX+ for the | |
// default modifier flag in layers, > 16 bit so not available here |
core/src/ldml/C7043_ldml.md
Outdated
| 0x0020 | `ctrl` | `K_CTRLFLAG` | Either Control | | ||
| 0x0040 | `alt` | `K_ALTFLAG` | Either Alt | | ||
| 0x0100 | `caps` | `CAPITALFLAG` | Caps lock | | ||
| 0x10000 | `default` | `K_DEFAULTMODFLAG` | Default (not used in conjunction with others) | |
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.
| 0x10000 | `default` | `K_DEFAULTMODFLAG` | Default (not used in conjunction with others) | | |
| 0x10000 | `default` | `DEFAULT_MODIFIER` | Default (not used in conjunction with others) | |
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.
per your other discussion it should be n/a here because it can't be used in kmx_file.h
core/src/ldml/ldml_vkeys.cpp
Outdated
|
||
// look for a layer with "default" | ||
{ | ||
const vkey_id id_default(vk, (K_DEFAULTMODFLAG)); |
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.
const vkey_id id_default(vk, (K_DEFAULTMODFLAG)); | |
const vkey_id id_default(vk, (DEFAULT_MODIFIER)); |
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 constant was removed, so using LDML_KEYS_MOD_DEFAULT instead
- remove default flag from kmx_file.h Fixes: #11072
b5c22e8
to
bca037c
Compare
Sorry, accidental push from the wrong ticket. |
- fix spec Fixes: #11072
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.
LGTM so far. But need comments similar to the one in kmx_file.h in the other headers mentioned in original issue: #11072 (comment)
OK. The other referenced files by you and not the other files referenced by me. Got it! Yes, I'll add comments, thanks. |
- at least add comments pointing back to keyman_core_ldml.ts Fixes: #11072
@mcdurdin PTAL. Pointing other usages back to keyman_core_ldml.ts |
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.
I'm not privy to the inner workings of KMX+, but is there a reason 0x0000 can't act as DEFAULT_MODIFIER
? Is it that you need some sort of target bit flag, rather than the absence of any?
See the original issue #11072. |
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.
LGTM, minor tweaks only
// There's an upcoming `/common/web/types` package that 'codes' and 'keyboards' may fit well within. | ||
// In fact, there's a file there (on its branch) that should be merged with this one! |
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.
There is a TODO for this. we haven't merged these yet.
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.
right. was just trying to update it
I've done so, and have even cross-referenced the spec to try to gain clarity. Sadly, my question still remains - the issue didn't clarify anything for me. I've left a comment on the base issue about my concerns. |
Yes, no modifier is not default. |
- the 'other' keyword was incorrectly called 'default' Fixes: #11072
Updated to be |
Changes in this pull request will be available for download in Keyman version 17.0.301-beta |
For: #11072
@keymanapp-test-bot skip