Skip to content

Fix keynum_t binds in bind menu#3455

Merged
slipher merged 1 commit intoUnvanquished:masterfrom
slipher:bind-keynum
Feb 23, 2026
Merged

Fix keynum_t binds in bind menu#3455
slipher merged 1 commit intoUnvanquished:masterfrom
slipher:bind-keynum

Conversation

@slipher
Copy link
Copy Markdown
Contributor

@slipher slipher commented Dec 4, 2025

A regression caused bindable key events not to be sent for any Keyboard::Key that can be translated to an RmlUi key. This is because the bindable key event started being disabled if the normal key event was consumed, but the normal key event was always consumed. This just affected keynum_t Key's since character ones are ignored anyway.

Instead of sending both normal RmlUi key events and bindable key events all the time, send only bindable key events during key binding and only normal key events otherwise. This should be a more reliable design anyway since some keys such as Tab and Enter could be interpreted as ones for navigating the document. So now Escape for canceling a bind will be detected through the bindable key event instead of the normal key event.

Fixes #3454.

A regression caused bindable key events not to be sent for any
Keyboard::Key that can be translated to an RmlUi key. This is because
the bindable key event started being disabled if the normal key event
was consumed, but the normal key event was always consumed. This just
affected keynum_t Key's since character ones are ignored anyway.

Instead of sending both normal RmlUi key events and bindable key events
all the time, send only bindable key events during key binding and only
normal key events otherwise. This should be a more reliable design
anyway since some keys such as Tab and Enter could be interpreted as
ones for navigating the document. So now Escape for canceling a bind
will be detected through the bindable key event instead of the normal
key event.

Fixes Unvanquished#3454.
Copy link
Copy Markdown
Member

@illwieckz illwieckz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@slipher slipher merged commit 1259b64 into Unvanquished:master Feb 23, 2026
7 of 9 checks passed
@slipher slipher deleted the bind-keynum branch February 23, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bind menu regression: unfriendly scancodes

2 participants