Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 508ded58 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Fix long press behavior of akye that has altCode defined

This issue has been introduced by I2bd4daf2

Change-Id: Ie10b3e0bb360986597a0f5a8e5b8253400f924c4
parent 13057e7c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -481,8 +481,11 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
     */
    protected boolean onLongPress(Key parentKey, PointerTracker tracker) {
        final int primaryCode = parentKey.mCode;
        if (parentKey.mAltCode != Keyboard.CODE_UNSPECIFIED) {
            // Long press on a key that has altCode defined.
        if (parentKey.mMoreKeys == null && !parentKey.altCodeWhileTyping()
                && parentKey.mAltCode != Keyboard.CODE_UNSPECIFIED) {
            // Long press on a key that has no more keys and not altCodeWhileTyping but altCode
            // defined, such as "0 +" key on phone layout and "/ :" key on datetime
            // layout.
            tracker.onLongPressed();
            invokeCodeInput(parentKey.mAltCode);
            invokeReleaseKey(primaryCode);