diff options
| author | Jules Aguillon | 2025-03-10 23:41:51 +0100 |
|---|---|---|
| committer | GitHub | 2025-03-10 23:41:51 +0100 |
| commit | 9cfeb0f0c22dd649fcf32260925a5a84a731d1b3 (patch) | |
| tree | 447ceb35fe87b086ec7f75c0bee7addc4619a16c /srcs/juloo.keyboard2/Autocapitalisation.java | |
| parent | 5e77fa84cff5a55cc26f3e02e2823ad0ec845c51 (diff) | |
| download | unexpected-keyboard-9cfeb0f0c22dd649fcf32260925a5a84a731d1b3.tar.gz unexpected-keyboard-9cfeb0f0c22dd649fcf32260925a5a84a731d1b3.zip | |
Add a delay after a Keyevent key in a macro (#918)
* Construct a single handler
* Add a delay after a Keyevent key in a macro
Add a delay before sending the next key to avoid race conditions causing
keys to be handled in the wrong order. Notably, KeyEvent keys handling
is scheduled differently than the other edit functions.
Diffstat (limited to 'srcs/juloo.keyboard2/Autocapitalisation.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Autocapitalisation.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/srcs/juloo.keyboard2/Autocapitalisation.java b/srcs/juloo.keyboard2/Autocapitalisation.java index a77d2e5..21fcaf6 100644 --- a/srcs/juloo.keyboard2/Autocapitalisation.java +++ b/srcs/juloo.keyboard2/Autocapitalisation.java @@ -1,7 +1,6 @@ package juloo.keyboard2; import android.os.Handler; -import android.os.Looper; import android.text.InputType; import android.text.TextUtils; import android.view.inputmethod.EditorInfo; @@ -27,9 +26,9 @@ public final class Autocapitalisation InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | InputType.TYPE_TEXT_FLAG_CAP_WORDS; - public Autocapitalisation(Looper looper, Callback cb) + public Autocapitalisation(Handler h, Callback cb) { - _handler = new Handler(looper); + _handler = h; _callback = cb; } |
