add sensitivity option

This commit is contained in:
hippoz 2022-08-26 16:41:57 +03:00
parent c0c1f84adb
commit c05a23912f
Signed by: hippoz
GPG key ID: 7C52899193467641

View file

@ -1,6 +1,8 @@
const HOLDING_THRESHOLD_MS = 300;
const SCROLL_X_DAMPENING = 0.02;
const SCROLL_Y_DAMPENING = 0.09;
const MOVE_X_MULTIPLIER = 1.64;
const MOVE_Y_MULTIPLIER = 1.64;
class TouchpadController {
constructor(connection) {
@ -119,7 +121,7 @@ class TouchpadController {
this._sendSingleClick("right");
} else {
if (
this._sendRelativeMouseMovement(deltaX, deltaY)
this._sendRelativeMouseMovement(deltaX * MOVE_X_MULTIPLIER, deltaY * MOVE_Y_MULTIPLIER)
) {
shouldMarkTouchesAsMoved = true;
}