Fix PS/2 Trackpoint mouse clicks (#22265) #23694
Merged
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.
Description
Bug report #22265 and fix by d93921012, I'm just pushing the change. There is a longer description the bug report; shorter summary:
When the main loop calls
ps2_mouse_task()
for the first time after the button down event, it finds no new data in the PS/2 receive buffer. Here it should return, or it tries to detect a button state change anyway and updates the mouse state with the button released before it is actually released. When doing click and drag, it cycles between button down and up.Tested on ARM ChibiOS (RP2040) with a Trackpoint from a Thinkpad T61. With this change it works perfectly. The keyboard itself is a home-made converter for the Thinkpad keyboard (only in my personal fork at this point).
Types of Changes
Issues Fixed or Closed by This PR
Checklist