abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Keyboard2View.java
diff options
context:
space:
mode:
authorJules Aguillon2022-05-08 16:38:44 +0200
committerJules Aguillon2022-05-08 16:55:03 +0200
commitb15ca662c2329fd638cbf74b097988c1be477cc8 (patch)
tree54e9d2a31c7eb054129a74e9b8714f1fd8a38e4f /srcs/juloo.keyboard2/Keyboard2View.java
parent9a48acfe3e5ab8e7cf6b748a0764b96fbf4ff484 (diff)
downloadunexpected-keyboard-b15ca662c2329fd638cbf74b097988c1be477cc8.tar.gz
unexpected-keyboard-b15ca662c2329fd638cbf74b097988c1be477cc8.zip
Better handling of removed keys and swipe geture
The "closest key" logic must be careful not to reveal keys removed by a modifier. Must check [_handler.onPointerSwipe] for every candidate values. [selected_value] is changed back to [selected_direction]. This adds a new bug: When the direction change, the selected value might not change but a vibration will be triggered anyway.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2View.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java
index 9234366..3ae0fdf 100644
--- a/srcs/juloo.keyboard2/Keyboard2View.java
+++ b/srcs/juloo.keyboard2/Keyboard2View.java
@@ -108,9 +108,11 @@ public class Keyboard2View extends View
public KeyValue onPointerSwipe(KeyValue k, int flags)
{
k = KeyModifier.handleFlags(k, flags);
- invalidate();
if (k != null)
+ {
+ invalidate();
vibrate();
+ }
return k;
}