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.
public static final int META_SHIFT_ON = KeyEvent.META_SHIFT_ON sourcepublic static final int META_ALT_ON = KeyEvent.META_ALT_ON sourcepublic static final int META_SYM_ON = KeyEvent.META_SYM_ON sourcepublic static final int META_CAP_LOCKED = 0x100 sourcepublic static final int META_ALT_LOCKED = 0x200 sourcepublic static final int META_SYM_LOCKED = 0x400 sourcepublic MetaKeyKeyListener() empty body sourcepublic static final int getMetaState(CharSequence text) sourcepublic static final int getMetaState(CharSequence text, KeyEvent event) sourcepublic static final int getMetaState(CharSequence text, int meta) sourcepublic static void adjustMetaAfterKeypress(Spannable content) sourceAfter 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) sourcepublic static void resetMetaState(Spannable text) sourceprotected static void resetLockedMeta(Spannable content) sourcepublic boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) sourcepublic boolean onKeyUp(View view, Editable content, int keyCode, KeyEvent event) sourcepublic void clearMetaKeyState(View view, Editable content, int states) sourcepublic static void clearMetaKeyState(Editable content, int states) sourceMade 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.