Android.Views.KeyEvent.ICallback.OnKeyDown Method
Called when a key down event has occurred.

Syntax

[Android.Runtime.Register("onKeyDown", "(ILandroid/view/KeyEvent;)Z", "GetOnKeyDown_ILandroid_view_KeyEvent_Handler:Android.Views.KeyEvent/ICallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool OnKeyDown ([Android.Runtime.GeneratedEnum] Keycode keyCode, KeyEvent e)

Parameters

keyCode
The value in event.getKeyCode().
e
Description of the key event.

Returns

Documentation for this section has not yet been entered.

Remarks

Called when a key down event has occurred. If you return true, you can first call KeyEvent.StartTracking to have the framework track the event through its Android.Views.KeyEvent.ICallback.OnKeyUp(Keycode, Android.Views.KeyEvent) and also call your Android.Views.KeyEvent.ICallback.OnKeyLongPress(Keycode, Android.Views.KeyEvent) if it occurs.

[Android Documentation]

Requirements

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