KeyCharacterMap.ModifierBehavior Property

Definition

Gets a constant that describes the behavior of this keyboard's modifier keys such as KeyEvent#KEYCODE_SHIFT_LEFT.

public virtual Android.Views.KeyModifierBehavior ModifierBehavior { [Android.Runtime.Register("getModifierBehavior", "()I", "GetGetModifierBehaviorHandler")] get; }
[<get: Android.Runtime.Register("getModifierBehavior", "()I", "GetGetModifierBehaviorHandler")>]
member this.ModifierBehavior : Android.Views.KeyModifierBehavior

Property Value

The modifier behavior for this keyboard.

Attributes

Remarks

Gets a constant that describes the behavior of this keyboard's modifier keys such as KeyEvent#KEYCODE_SHIFT_LEFT.

Currently there are two behaviors that may be combined:

<ul> <li>Chorded behavior: When the modifier key is pressed together with one or more character keys, the keyboard inserts the modified keys and then resets the modifier state when the modifier key is released.</li> <li>Toggled behavior: When the modifier key is pressed and released on its own it first toggles into a latched state. When latched, the modifier will apply to next character key that is pressed and will then reset itself to the initial state. If the modifier is already latched and the modifier key is pressed and release on its own again, then it toggles into a locked state. When locked, the modifier will apply to all subsequent character keys that are pressed until unlocked by pressing the modifier key on its own one more time to reset it to the initial state. Toggled behavior is useful for small profile keyboards designed for thumb typing. </ul>

This function currently returns #MODIFIER_BEHAVIOR_CHORDED when the #getKeyboardType() keyboard type is #FULL or #SPECIAL_FUNCTION and #MODIFIER_BEHAVIOR_CHORDED_OR_TOGGLED otherwise. In the future, the function may also take into account global keyboard accessibility settings, other user preferences, or new device capabilities.

Java documentation for android.view.KeyCharacterMap.getModifierBehavior().

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