Android.Text.Method.MetaKeyKeyListener Class
This base class encapsulates the behavior for tracking the state of meta keys such as SHIFT, ALT and SYM as well as the pseudo-meta state of selecting text.

See Also: MetaKeyKeyListener Members

Syntax

[Android.Runtime.Register("android/text/method/MetaKeyKeyListener", DoNotGenerateAcw=true)]
public abstract class MetaKeyKeyListener : Java.Lang.Object

Remarks

This base class encapsulates the behavior for tracking the state of meta keys such as SHIFT, ALT and SYM as well as the pseudo-meta state of selecting text.

private char getUnicodeChar(TextKeyListener listener, KeyEvent event, Editable textBuffer) { // Use the combined meta states from the event and the key listener. int metaState = event.getMetaState() | listener.getMetaState(textBuffer); return event.getUnicodeChar(metaState); }

Key listeners that care about meta state should inherit from this class; you should not instantiate this class directly in a client.

This class provides two mechanisms for tracking meta state that can be used together or independently.

The behavior of this class varies according to the keyboard capabilities described by the Android.Views.KeyCharacterMap of the keyboard device such as the Android.Views.KeyCharacterMap.ModifierBehavior.

Android.Text.Method.MetaKeyKeyListener implements chorded and toggled key modifiers. When key modifiers are toggled into a latched or locked state, the state of the modifier is stored in the Android.Text.IEditable text buffer or in a meta state integer managed by the client. These latched or locked modifiers should be considered to be held in addition to those that the keyboard already reported as being pressed in Android.Views.KeyEvent.MetaState. In other words, the Android.Text.Method.MetaKeyKeyListener augments the meta state provided by the keyboard; it does not replace it. This distinction is important to ensure that meta keys not handled by Android.Text.Method.MetaKeyKeyListener such as Android.Views.KeyEvent.KEYCODE_CAPS_LOCK or Android.Views.KeyEvent.KEYCODE_NUM_LOCK are taken into consideration.

To ensure correct meta key behavior, the following pattern should be used when mapping key codes to characters:

[Android Documentation]

Requirements

Namespace: Android.Text.Method
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1