Limit unbindkeyset to the keyset or chain that was named - #3142
Open
burnhamrobertp wants to merge 1 commit into
Open
Limit unbindkeyset to the keyset or chain that was named#3142burnhamrobertp wants to merge 1 commit into
burnhamrobertp wants to merge 1 commit into
Conversation
sprunk
approved these changes
Jul 29, 2026
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.
Fixes #3141. Chains are stored under their last keyset, so the list for a key holds every chain ending with it, and unbindkeyset erased that whole list.
unbindkeyset atherefore also droppeda,aanda,a,a.It now parses a keychain rather than a single keyset and removes only the entries whose chain matches exactly, which also means you can name a chain to get at just that one.
unbindkeyset a,apreviously removed nothing at all, since the comma failed to parse.Comparing with
==keeps it from reaching across modifier combinations, same as #3136 does for unbind, so namingany+jwon't take out a boundctrl+j.A key that only appears mid-chain still isn't reachable this way, which I think is right for a command that names a keyset -
sc_a,sc_l,sc_aisn't the keysetsc_l. If we ever want "clear anything involving this key" that feels like its own command.Nothing in BAR looks affected: it only unbindkeysets f11 variants and one dynamic keybind, and no chains end in f11.
Verified headless - naming the plain key, the 2-chain and the 3-chain each drop only their own binds, mid-chain is left alone, modifier matching is exact both ways, and all actions sharing a named keyset still go together.
Used Claude to help investigate and write this.