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

Commit 69f41906 authored by David Daynard's avatar David Daynard Committed by Gerrit Code Review
Browse files

QwertyKeyListener: Add support for www and .com key

Add support for www and .com key on devices with physical keyboards.
This code is identical to what was present in ICS.

Change-Id: I55e6c248959e0a0657bbd8e3840470ae7adbd8ed
parent 8a207d7f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -133,6 +133,12 @@ public class QwertyKeyListener extends BaseKeyListener {
            return true;
        }

        if (i == KeyCharacterMap.DOT_WWW_INPUT || i == KeyCharacterMap.DOT_COM_INPUT) {
            content.replace(selStart, selEnd, selStart == 0 ? "www." : ".com");
            adjustMetaAfterKeypress(content);
            return true;
        }

        if (i == KeyCharacterMap.HEX_INPUT) {
            int start;

+12 −0
Original line number Diff line number Diff line
@@ -121,6 +121,18 @@ public class KeyCharacterMap implements Parcelable {
     */
    public static final char PICKER_DIALOG_INPUT = '\uEF01';

    /**
     * Private use character denoting a .com suffix
     * @hide
     */
    public static final char DOT_COM_INPUT = '\uEF03';

    /**
     * Private use character denoting a www. prefix
     * @hide
     */
    public static final char DOT_WWW_INPUT = '\uEF04';

    /**
     * Modifier keys may be chorded with character keys.
     *