Skip to content

Improve down/up event handling of axes#285

Merged
daid merged 1 commit into
daid:masterfrom
oznogon:down-up-event-with-axes
Dec 28, 2025
Merged

Improve down/up event handling of axes#285
daid merged 1 commit into
daid:masterfrom
oznogon:down-up-event-with-axes

Conversation

@oznogon

@oznogon oznogon commented Dec 23, 2025

Copy link
Copy Markdown
Contributor

Axis bindings, including some buttons that report as axes, can emit negative values that Keybinding::setValue() handles inconsistently with regard to setting down_event and up_event. This can cause button presses or axis movements that should trigger events to fail only because they emit negative values (left/down stick movements, certain triggers or sliders that rest at 0 and report negative values in one direction).

Movement axes arguably shouldn't trigger down_/up_events at all, so ignore mouse and joystick movement axes, but not game controller axes, which are often pressure-sensitive buttons or triggers. For other axes, handle negative values when calculating whether they exceed the threshold to trigger the event.

@daid
daid merged commit 83fc728 into daid:master Dec 28, 2025
6 checks passed
@oznogon
oznogon deleted the down-up-event-with-axes branch January 1, 2026 03:01
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.

2 participants