Table of Contents

Method OnKeyDown

Namespace
Alternet.UI
Assembly
Alternet.UI.Maui.dll

OnKeyDown(Keycode, KeyEvent?)

Default implementation of KeyEvent.Callback#onKeyDown(int, KeyEvent) KeyEvent.Callback.onKeyDown(): perform press of the view when KeyEvent#KEYCODE_DPAD_CENTER or KeyEvent#KEYCODE_ENTER is released, if the view is enabled and clickable.

public override bool OnKeyDown(Keycode keyCode, KeyEvent? e)

Parameters

keyCode Keycode

a key code that represents the button pressed, from android.view.KeyEvent

e KeyEvent

The KeyEvent object that defines the button action.

Returns

bool

To be added.

Remarks

Default implementation of KeyEvent.Callback#onKeyDown(int, KeyEvent) KeyEvent.Callback.onKeyDown(): perform press of the view when KeyEvent#KEYCODE_DPAD_CENTER or KeyEvent#KEYCODE_ENTER is released, if the view is enabled and clickable.

Key presses in software keyboards will generally NOT trigger this listener, although some may elect to do so in some situations. Do not rely on this to catch software key presses.

Java documentation for

android.view.View.onKeyDown(int, android.view.KeyEvent)
.

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.