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

Commit b29343ea authored by Josep del Río's avatar Josep del Río Committed by Automerger Merge Worker
Browse files

Merge "Exit active mode on Escape key" into udc-dev am: a7b390fe

parents 6b0f2db7 a7b390fe
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -360,6 +360,15 @@ public class QwertyKeyListener extends BaseKeyListener {
                    return super.onKeyDown(view, content, keyCode, event);
                    return super.onKeyDown(view, content, keyCode, event);
                }
                }


                return true;
            }
        } else if (keyCode == KeyEvent.KEYCODE_ESCAPE && event.hasNoModifiers()) {
            // If user is in the process of composing with a dead key, and
            // presses Escape, cancel it. We need special handling because
            // the Escape key will not produce a Unicode character
            if (activeStart == selStart && activeEnd == selEnd) {
                Selection.setSelection(content, selEnd);
                content.removeSpan(TextKeyListener.ACTIVE);
                return true;
                return true;
            }
            }
        }
        }