New feature: ignore new touches at top edge. #115
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.
I'm using this driver on my MacBook Pro. Very often I accidentally clicked using the side of my thumbs when I'm typing on the keyboard. I only touched the top 10% or something of the touchpad. So I added a new feature to be able to ignore new touches on the top of the touchpad.
Two new variables:
TopEdge
andIgnoreTop
. I know this could have been done in one setting, however, it seems to be more generic towards to future to split the size and the behavior of it.Edit: After using this for some time. I decided to add support for specifically ignoring the top corners, instead of the top edge. This also introduces two new variables:
TopCorners
andIgnoreTopCorners
. This also showed there was a bug in the coordinate system. You forgot to subtract the minimum value of the coordinates (obtained through the capabilities). So right now, I'm subtracting the minimum before storing the coordinates in thestruct Touch
itsx
andy
variables. I'm not sure if this breaks anything else (since coordinates are now always non-negative), but so far I'm not experiencing any problems. If this does break something, please let me know!Note: my vim stripped the trailing spaces in the
README.md
file. I can't really undo that (because I hate nano).