From 66b7b532c928465041727a5d4c7f75f984d4afde Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Tue, 20 Apr 2021 00:35:52 +0200 Subject: Disable vibration when holding keys --- srcs/juloo.keyboard2/Keyboard2View.java | 4 ---- 1 file changed, 4 deletions(-) (limited to 'srcs') diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index 3035d03..4081259 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -309,18 +309,14 @@ public class Keyboard2View extends View if (key.timeoutWhat == msg.what) { long nextInterval = _config.longPressInterval; - boolean doVibrate = true; if (_config.preciseRepeat && (key.flags & KeyValue.FLAG_PRECISE_REPEAT) != 0) { // Modulate repeat interval depending on the distance of the pointer float accel = Math.min(4.f, Math.max(0.3f, key.ptrDist / (_config.subValueDist * 15.f))); nextInterval = (long)((float)nextInterval / accel); - doVibrate = false; } _handler.sendEmptyMessageDelayed(msg.what, nextInterval); ((Keyboard2)getContext()).handleKeyUp(key.value, _flags); - if (doVibrate) - vibrate(); return (true); } } -- cgit v1.2.3