From 58e37b484c8d4cf8099372e6f307557d0ed2458e Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 11 Dec 2021 01:03:36 +0100 Subject: [PATCH] Fix Android's builtin shortcut not working The 'repeat' field of generated key events was incorrectly set to '1'. --- srcs/juloo.keyboard2/Keyboard2.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); }