fix(keymap): repair refreshing behavior (niri), options not working and key rendering - #332
Draft
MateusAquino wants to merge 1 commit into
Draft
fix(keymap): repair refreshing behavior (niri), options not working and key rendering#332MateusAquino wants to merge 1 commit into
MateusAquino wants to merge 1 commit into
Conversation
…nd key rendering - Refresh requests issued while the panel was closed replayed on reopen and ran the parser inside the 25ms watch-callback budget, aborting mid-parse and pinning the snapshot at "loading" forever; refreshes now defer to the service update tick and the parsers run as coroutines with wall-clock-throttled slices. - merge_sequential silently never merged numbered Niri runs (every bind carries a fingerprint, which disabled merging); show_undescribed now also hides Niri binds with an empty or null hotkey-overlay-title. - Wide chords and merged rows render as distinct key pills (one line per combination) instead of collapsing into a single unreadable label. - Added merge_similar setting: same-action shortcuts fold into one read-only row listing every combo. - Unified the key display-name tables across Hyprland, Niri, and MangoWC.
Contributor
ItsLemmy
marked this pull request as draft
August 10, 2026 16:14
Contributor
|
waiting for @blackbartblues review |
Contributor
|
Approved |
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.
Plugin
blackbartblues/keymapplugin.toml)What it does
Compatibility with other compositors had several major problems, notably: refreshing, loading indefinitely, inconsistent key names (eg.: XF86Calculator) and options which does not take any effect. This PR aims to fix these problems and add some improvements.
cc: @blackbartblues (maintainer)
Added
[Click to Expand]Newmerge_similaroption: shortcuts that trigger the same action (eg. "Close Window" onSuper+WandAlt+F4) collapses into a single read-only row listing every key combination.Fixed
[Click to Expand]Fixed panel stuck on "Loading keybindings" (tested on niri) after closing and reopening the panel: refreshes were replaying the full request backlog and execution is also deferred from the 25 ms state-watch callback into the service's own update tick, so a parse can no longer be aborted by a shared callback budget mid-flight. Note refreshing with the UI open was also not working (tested on niri);[Click to Expand]Fixed missing debugging logs/errors: Internal parser errors now surface their actual Lua error text on the error panel instead of an opaque "unknown error";[Click to Expand]Fixedshow_undescribed=trueoption, which was NOT hiding Niri binds whosehotkey-overlay-titleis missing, empty (""), ornullvalues;[Click to Expand]Fixedmerge_sequential=trueoption, which was NOT merging sequential keybindings (tested on niri);[Click to Expand]Fixed long keybindings being replaced with a single merged keybind.Changed
[Click to Expand]Unified the key display-name tables across Hyprland, Niri, and MangoWC so the same key reads identically for every compositor (ie. missing `XF86Calculator`, `XF86Mail`, touchpad scrolls, and punctuations on Niri/Mango service which was only present in Hyprland service).External dependencies
Unchanged:
hyprctl,niri,mango,mmsg,xdg-open(already declared inplugin.toml). No new external calls.Testing
niri_settings_test.lua(sequential merging, undescribed-title filtering, similar-action merging, refresh-watcher echo suppression),merge_similar_test.lua(MangoWC + Hyprland similar-action merging), andniri_scanner_test.lua(rewritten scanners checked byte-for-byte against the original implementations over a corpus plus 3000 fuzzed inputs).command_library_test.py,i18n_test.py).merge_sequentialon/off,show_undescribedon/off,merge_similaron/off.Compositors:
v5.0.0-beta.7Screenshots / Videos
There are screenshots on all of the expandable entries above in the PR.
Here's also a video showing how it was before (1.4.0) and after (1.5.0) patches on Niri.
Before
before.mp4
After
after.mp4
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows theREADME template, documents
every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
catalog.toml; CI generates it.Code review attestation
Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
licensedeclared inplugin.toml.