MetaKeyKeyListener

Class of android.text.method · MetaKeyKeyListener.java · Android's reference

public abstract class MetaKeyKeyListener

The state of the shift, alt and sym keys of a text, kept as spans on it. A meta key that is pressed and released alone stays on for the next key. Two such presses lock it, and a third unlocks it.

Extended in the framework by

Fields

public static final int META_SHIFT_ON = KeyEvent.META_SHIFT_ON source
public static final int META_ALT_ON = KeyEvent.META_ALT_ON source
public static final int META_SYM_ON = KeyEvent.META_SYM_ON source
public static final int META_CAP_LOCKED = 0x100 source
public static final int META_ALT_LOCKED = 0x200 source
public static final int META_SYM_LOCKED = 0x400 source

Constructors

public MetaKeyKeyListener() empty body source

Methods

public static final int getMetaState(CharSequence text) source
public static final int getMetaState(CharSequence text, KeyEvent event) source
public static final int getMetaState(CharSequence text, int meta) source
public static void adjustMetaAfterKeypress(Spannable content) source

After a key that is not a meta key: a meta key that was on for one key goes off, and a held one counts as used.

public static boolean isMetaTracker(CharSequence text, Object what) source
public static void resetMetaState(Spannable text) source
protected static void resetLockedMeta(Spannable content) source
public boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) source
public boolean onKeyUp(View view, Editable content, int keyCode, KeyEvent event) source
public void clearMetaKeyState(View view, Editable content, int states) source
public static void clearMetaKeyState(Editable content, int states) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.