This patch adds cursor acceleration to KDEConnect's remote input plugin. The cursor movement is now scaled down if the movement is slow, and scaled up if the movement is fast.
The acceleration is implemented on the android side. An additional setting was added to the android app's Remote Control plugin preferences, allowing the user to choose the strength of the acceleration, or to disable the acceleration completely.
Details
- Reviewers
albertvaka - Group Reviewers
KDE Connect - Commits
- R225:6db7ffd1dbac: Add acceleration to remote input cursor
After installing this revision on your android device, go to the remote input page and start using the mousepad. Cursor acceleration should be enabled by default.
Check if the cursor acceleration is intuitive and easy to use. Also, try tweaking the acceleration in the Remote input settings in the Plugin settings menu.
Diff Detail
- Repository
- R225 KDE Connect - Android application
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Thanks a lot for implementing this! Moving the cursor now feels really good. My perfect config is with sensitivity: "above default" and acceleration: "weaker" :)
I've added a comment inline with one thing I would change.
src/org/kde/kdeconnect/Plugins/MousePadPlugin/PointerAccelerationProfileFactory.java | ||
---|---|---|
20 | I don't like this making an allocation every frame... Maybe you can change it so it's not needed? Eg: Making accumulatedX and accumulatedY public, and adding a resetMouseDelta() function to set them to zero, or allocating a single MouseDelta and reusing that one. What do you think? |
src/org/kde/kdeconnect/Plugins/MousePadPlugin/PointerAccelerationProfileFactory.java | ||
---|---|---|
20 | I'm not sure if allocating a tiny object every frame would be that much of a performance hit, but that's a fair point. |