Skip to content

Commit

Permalink
Ignore key events for visible characters
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Nov 27, 2020
1 parent 6e49951 commit 06aeb98
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/android.go
Expand Up @@ -545,6 +545,9 @@ func processKey(env *C.JNIEnv, e *C.AInputEvent) {
Rune: rune(C.getKeyRune(env, e)),
Code: convAndroidKeyCode(int32(C.AKeyEvent_getKeyCode(e))),
}
if k.Rune >= '0' && k.Rune <= '9' { // GBoard generates key events for numbers, but we see them in textChanged
return
}
switch C.AKeyEvent_getAction(e) {
case C.AKEY_STATE_DOWN:
k.Direction = key.DirPress
Expand Down

0 comments on commit 06aeb98

Please sign in to comment.