Share via


KeyEvent.NormalizeMetaState(MetaKeyStates) Method

Definition

Normalizes the specified meta state.

[Android.Runtime.Register("normalizeMetaState", "(I)I", "")]
public static Android.Views.MetaKeyStates NormalizeMetaState (Android.Views.MetaKeyStates metaState);
[<Android.Runtime.Register("normalizeMetaState", "(I)I", "")>]
static member NormalizeMetaState : Android.Views.MetaKeyStates -> Android.Views.MetaKeyStates

Parameters

metaState
MetaKeyStates

The meta state.

Returns

The normalized meta state.

Attributes

Remarks

Normalizes the specified meta state.

The meta state is normalized such that if either the left or right modifier meta state bits are set then the result will also include the universal bit for that modifier.

If the specified meta state contains #META_ALT_LEFT_ON then the result will also contain #META_ALT_ON in addition to #META_ALT_LEFT_ON and the other bits that were specified in the input. The same is process is performed for shift, control and meta.

If the specified meta state contains synthetic meta states defined by MetaKeyKeyListener, then those states are translated here and the original synthetic meta states are removed from the result. MetaKeyKeyListener#META_CAP_LOCKED is translated to #META_CAPS_LOCK_ON. MetaKeyKeyListener#META_ALT_LOCKED is translated to #META_ALT_ON. MetaKeyKeyListener#META_SYM_LOCKED is translated to #META_SYM_ON.

Undefined meta state bits are removed.

Java documentation for android.view.KeyEvent.normalizeMetaState(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to