20
851
Fork
You've already forked fuzzel
83

wayland: match unshifted key-bindings before shifted #476

Manually merged
dnkl merged 1 commit from keybindings-unshifted-before-shifted into master 2025年01月31日 10:30:28 +01:00
Owner
Copy link

That is, try to match e.g. Control+shift+a, before trying to match Control+A.

In most cases, order doesn't matter. There are however a couple of symbols where the layout consumes the shift-modifier, and the generated symbol is the same in both the shifted and unshifted form. One such example is backspace.

Before this patch, key-bindings with shift-backspace would be ignored, if there were another key-binding with backspace.

So, for example, if we had one key-binding with Control+Backspace, and another with Control+Shift+Backspace, the latter would never trigger, as we would always match the first one.

By checking for unshifted matches first, we ensure Control+Shift+Backspace does match.

That is, try to match e.g. Control+shift+a, before trying to match Control+A. In most cases, order doesn't matter. There are however a couple of symbols where the layout consumes the shift-modifier, _and_ the generated symbol is the same in both the shifted and unshifted form. One such example is backspace. Before this patch, key-bindings with shift-backspace would be ignored, *if* there were another key-binding with backspace. So, for example, if we had one key-binding with Control+Backspace, and another with Control+Shift+Backspace, the latter would never trigger, as we would always match the first one. By checking for unshifted matches first, we ensure Control+Shift+Backspace does match.
wayland: match unshifted key-bindings before shifted
Some checks reported errors
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
builds.sr.ht/freebsd-x64 Job failed
ci/woodpecker/push/woodpecker Pipeline was successful
cc5718252b
That is, try to match e.g. Control+shift+a, before trying to match
Control+A.
In most cases, order doesn't matter. There are however a couple of
symbols where the layout consumes the shift-modifier, _and_ the
generate symbol is the same in both the shifted and unshifted
form. One such example is backspace.
Before this patch, key-bindings with shift-backspace would be
ignored, *if* there were another key-binding with backspace.
So, for example, if we had one key-binding with Control+Backspace, and
another with Control+Shift+Backspace, the latter would never trigger,
as we would always match the first one.
By checking for unshifted matches first, we ensure
Control+Shift+Backspace does match.
dnkl manually merged commit cc5718252b into master 2025年01月31日 10:30:28 +01:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/fuzzel!476
Reference in a new issue
dnkl/fuzzel
No description provided.
Delete branch "keybindings-unshifted-before-shifted"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?