Skip to content

Conversation

@YNataniel295
Copy link

@YNataniel295 YNataniel295 commented Jan 22, 2026

Fixes an issue where LMB would be released immediately when the pen is in hover range. Added pen pressure hysteresis, may be needed.

Here are links to the reported issues.
https://osu.ppy.sh/community/forums/topics/2089384
ppy/osu#27310

Fixes an issue where LMB would be released immediately when the pen is in hover range.
Added pen pressure hysteresis, may be needed.
Fixes an issue where LMB would be released immediately when the pen is in hover range.
Added pen pressure hysteresis, may be needed.
Precision = 0.005f,
};

public BindableFloat PressureHysteresis { get; } = new BindableFloat(0.0f)
Copy link
Member

Choose a reason for hiding this comment

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

Is this the kind of thing we can hard-code instead? I feel like we should be able to come up with a pretty good value which will work for 99.999% of users.

Copy link
Author

@YNataniel295 YNataniel295 Jan 22, 2026

Choose a reason for hiding this comment

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

The game already has a pressure threshold slider. Maybe we should add a similar pressure hysteresis slider for user customization or add it as an experimental feature? Maybe set the default value to 0.05 or leave it at 0 to not change the existing logic.

In the current version, the pen always sends the LMB state. Is this to prevent hangs in the held state, or is there another reason?

Copy link
Author

Choose a reason for hiding this comment

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

I removed the public PressureHysteresis setting / API and hard-coded a small internal hysteresis band (0.05) to avoid chatter around the existing PressureThreshold. Main fix remains: only enqueue pen button state on changes, plus explicit release when tablet disappears.

Stop continuously propagating pen LMB state; use edge-only press/release with a small internal hysteresis and release on tablet disconnect.
@YNataniel295 YNataniel295 changed the title Fix LMB hold when hovering with tablet pen Remove PressureHysteresis API; hard-code internal hysteresis (0.05) around PressureThreshold. Jan 23, 2026
@YNataniel295 YNataniel295 changed the title Remove PressureHysteresis API; hard-code internal hysteresis (0.05) around PressureThreshold. Fix LMB hold when hovering with tablet pen Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants