Android.App.Activity.SetDefaultKeyMode Method
Select the default key handling for this activity.

Syntax

[Android.Runtime.Register("setDefaultKeyMode", "(I)V", "")]
public void SetDefaultKeyMode ([Android.Runtime.GeneratedEnum] DefaultKey mode)

See Also

Activity.OnKeyDown(Android.Views.Keycode, Android.Views.KeyEvent)

Parameters

mode
The desired default key mode constant.

Remarks

Select the default key handling for this activity. This controls what will happen to key events that are not otherwise handled. The default mode (Activity.DEFAULT_KEYS_DISABLE) will simply drop them on the floor. Other modes allow you to launch the dialer (Activity.DEFAULT_KEYS_DIALER), execute a shortcut in your options menu without requiring the menu key be held down (Activity.DEFAULT_KEYS_SHORTCUT), or launch a search (Activity.DEFAULT_KEYS_SEARCH_LOCAL and Activity.DEFAULT_KEYS_SEARCH_GLOBAL).

Note that the mode selected here does not impact the default handling of system keys, such as the "back" and "menu" keys, and your activity and its views always get a first chance to receive and handle all application keys.

[Android Documentation]

Requirements

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