diff options
| author | Jules Aguillon | 2021-04-20 00:35:52 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2021-04-20 00:35:52 +0200 |
| commit | 66b7b532c928465041727a5d4c7f75f984d4afde (patch) | |
| tree | 9ad37bcc25526d555522fd107b40602ab52d2a06 | |
| parent | 5dec9c12154b6eec752c9fa88fde0b392b78db61 (diff) | |
| download | unexpected-keyboard-66b7b532c928465041727a5d4c7f75f984d4afde.tar.gz unexpected-keyboard-66b7b532c928465041727a5d4c7f75f984d4afde.zip | |
Disable vibration when holding keys
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2View.java | 4 |
1 files changed, 0 insertions, 4 deletions
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); } } |
