abouttreesummaryrefslogcommitdiff
path: root/srcs
diff options
context:
space:
mode:
authorJules Aguillon2021-12-11 01:03:36 +0100
committerJules Aguillon2021-12-11 01:03:36 +0100
commit58e37b484c8d4cf8099372e6f307557d0ed2458e (patch)
treea52a3d00027ea737e8c736777d3f50860bcf5d4e /srcs
parentcca832954e36365f4b6e170c7a589b87da6bece9 (diff)
downloadunexpected-keyboard-58e37b484c8d4cf8099372e6f307557d0ed2458e.tar.gz
unexpected-keyboard-58e37b484c8d4cf8099372e6f307557d0ed2458e.zip
Fix Android's builtin shortcut not working
The 'repeat' field of generated key events was incorrectly set to '1'.
Diffstat (limited to 'srcs')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java
index fa4956c..58e71a3 100644
--- a/srcs/juloo.keyboard2/Keyboard2.java
+++ b/srcs/juloo.keyboard2/Keyboard2.java
@@ -265,7 +265,7 @@ public class Keyboard2 extends InputMethodService
metaState |= KeyEvent.META_ALT_LEFT_ON | KeyEvent.META_ALT_ON;
if ((flags & KeyValue.FLAG_SHIFT) != 0)
metaState |= KeyEvent.META_SHIFT_LEFT_ON | KeyEvent.META_SHIFT_ON;
- event = new KeyEvent(1, 1, KeyEvent.ACTION_DOWN, key.eventCode, 1, metaState);
+ event = new KeyEvent(1, 1, KeyEvent.ACTION_DOWN, key.eventCode, 0, metaState);
getCurrentInputConnection().sendKeyEvent(event);
getCurrentInputConnection().sendKeyEvent(KeyEvent.changeAction(event, KeyEvent.ACTION_UP));
}