add sensitivity option
This commit is contained in:
parent
c0c1f84adb
commit
c05a23912f
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
||||||
const HOLDING_THRESHOLD_MS = 300;
|
const HOLDING_THRESHOLD_MS = 300;
|
||||||
const SCROLL_X_DAMPENING = 0.02;
|
const SCROLL_X_DAMPENING = 0.02;
|
||||||
const SCROLL_Y_DAMPENING = 0.09;
|
const SCROLL_Y_DAMPENING = 0.09;
|
||||||
|
const MOVE_X_MULTIPLIER = 1.64;
|
||||||
|
const MOVE_Y_MULTIPLIER = 1.64;
|
||||||
|
|
||||||
class TouchpadController {
|
class TouchpadController {
|
||||||
constructor(connection) {
|
constructor(connection) {
|
||||||
|
@ -119,7 +121,7 @@ class TouchpadController {
|
||||||
this._sendSingleClick("right");
|
this._sendSingleClick("right");
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (
|
||||||
this._sendRelativeMouseMovement(deltaX, deltaY)
|
this._sendRelativeMouseMovement(deltaX * MOVE_X_MULTIPLIER, deltaY * MOVE_Y_MULTIPLIER)
|
||||||
) {
|
) {
|
||||||
shouldMarkTouchesAsMoved = true;
|
shouldMarkTouchesAsMoved = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue