Convert CTRL to custom matrix lite to fix double-presses #13467
Closed
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
Convert Massdrop (aka Drop) CTRL to the custom matrix lite API.
Notably this replaces the custom debounce with the common debounce API
which in turn resolves key double-pressing issues.
The original debounce sets a timer when any key changes then stops all
scanning until the timer expires. Since it is not scanning, the code
cannot suppress long bounces or multiple keys bouncing at once.
As a result, those events cause unwanted double presses.
This fix could have patched the buggy debounce or integrated the
debounce API, but converting to the lite API is simpler and reduces the
amount of custom code to maintain.
In theory this board doesn't strictly need any custom matrix code at all
except that this platform lacks proper library support (see #11119).
Types of Changes
Issues Fixed or Closed by This PR
None known
Checklist
Tested successfully on actual keyboard. After patching I have observed no double-press events.
I acknowledge that I've read the coding conventions, but deliberately choose to follow existing style in this file.