fix(config): support Unicode keymap aliases - #1004
Conversation
Size Report
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46d66a2247
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let alias_len = current_keys[alias_start..] | ||
| .find(char::is_whitespace) | ||
| .unwrap_or(current_keys.len() - alias_start); |
There was a problem hiding this comment.
Make Unicode alias separators valid keymap whitespace
When an alias is followed by non-ASCII whitespace such as NBSP or an ideographic space, this scan ends the alias at that character but leaves the separator in next_keys. The unchanged keymap.pest WHITESPACE rule accepts only space, tab, newline, and carriage return, so the Unicode separator is absorbed into an adjacent loose_identifier or causes parsing to fail, producing an invalid action or incorrect key count. Normalize/consume these separators during expansion or extend the grammar to recognize the same whitespace set.
Useful? React with 👍 / 👎.
|
This cannot close #569 |
|
@tianrking Hey could you please update the PR and fix the issue/comment? Thanks! |
46d66a2 to
94cc07d
Compare
Related to #569.
Summary
[aliases]configuration format.Validation
cargo test --manifest-path rmk-config/Cargo.toml(92 unit tests and 6 integration tests passed; doc tests passed)cargo clippy --manifest-path rmk-config/Cargo.toml --all-targets --all-features -- -D warningscargo +nightly fmt --manifest-path rmk-config/Cargo.toml --checkgit diff upstream/main...HEAD --checkScope
This PR fixes Unicode handling in the existing
keyboard.toml[aliases]path. It does not add the Rust-code alias API requested in #569, so that issue should remain open.