Conversation
KEYBOARD_KEY_CIDS had no entry for CID 0x000a — Solaar's special_keys.py names it CONTROL.Calculator — so the Calculator key above the numpad on the MX Keys S was never diverted and stayed on its native AL_Calculator function, with no way to bind it to an action. Adds ButtonId::KeyCalculator alongside its eight siblings in this family (KeySearch, KeyDictation, ...): a label, a translation key (with the matching locale entry in all 23 catalogs), a None default (an unbound key is never diverted, same as its siblings), and the CID table entry that arms it. Like the rest of this ButtonId family, there is currently no GUI editor surface for it — only config.toml/CLI can set a binding today. That's a pre-existing gap shared by all nine keys, not something this change introduces. Fixes AprilNEA#1147
|
Contributor
Author
|
Closing in favor of #1247 — an existing external contributor PR doing the same thing (Calculator key CID 0x000a), opened before this one. Per project convention, contributor PRs are adopted (rebased, findings fixed) rather than superseded by a duplicate from us. Will rebase #1247 onto current master separately. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
KEYBOARD_KEY_CIDS(crates/openlogi-device/src/session/keyboard.rs) had no entry for HID++ control0x000a— Solaar'sspecial_keys.pynames itCONTROL.Calculator— so the Calculator key above the numpad on the MX Keys S was never diverted and stayed on its nativeAL_CalculatorHID function, with no way to bind it to a custom action.ButtonId::KeyCalculatoralongside its eight existing siblings in this family (KeySearch,KeyDictation,KeyEmoji,KeyScreenCapture,KeyMicMute,KeyPlayPause,KeyMute,KeyVolumeDown,KeyVolumeUp), following the exact same pattern each of those already uses.Changes
crates/openlogi-core/src/binding/button.rs: newButtonId::KeyCalculatorvariant, added toKEYBOARD_KEYS, with a label and translation key.crates/openlogi-core/src/binding/defaults.rs:Nonedefault, matching every other key in this family (an unbound key is never diverted, so it stays on its native function until the user explicitly binds it).crates/openlogi-device/src/session/keyboard.rs:(0x000a, ButtonId::KeyCalculator)added toKEYBOARD_KEY_CIDS, cross-checked against Solaar'sspecial_keys.py. Added a unit test.crates/openlogi-ui/locales/*.toml: addedkeyboard.calculator_keyto all 23 catalogs at the same position (English text as placeholder for non-English locales, per this repo's i18n policy).Scope note
Like the rest of this
ButtonIdfamily, there is currently no GUI editor surface for any of these nine keys — onlyconfig.toml/CLI can set a binding today. That's a pre-existing gap this PR doesn't introduce or attempt to close; it only extends the family this specific key belongs to, consistent with how its siblings already work.Testing
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace(40/40 suites green, including the new CID-table test)cargo test -p openlogi-ui locale(catalog parity) andcargo test -p openlogi-desktop i18n(typed-key coverage, which iteratesButtonId::KEYBOARD_KEYS)RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items --exclude openlogi-ui --exclude openlogi-desktop --exclude openlogi-overlay --exclude openlogi-agentFixes #1147