Dela via


KeyboardView.IOnKeyboardActionListener.OnKey(Keycode, Keycode[]) Method

Definition

Send a key press to the listener.

[Android.Runtime.Register("onKey", "(I[I)V", "GetOnKey_IarrayIHandler:Android.InputMethodServices.KeyboardView/IOnKeyboardActionListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnKey (Android.Views.Keycode primaryCode, Android.Views.Keycode[]? keyCodes);
[<Android.Runtime.Register("onKey", "(I[I)V", "GetOnKey_IarrayIHandler:Android.InputMethodServices.KeyboardView/IOnKeyboardActionListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnKey : Android.Views.Keycode * Android.Views.Keycode[] -> unit

Parameters

primaryCode
Keycode

this is the key that was pressed

keyCodes
Keycode[]

the codes for all the possible alternative keys with the primary code being the first. If the primary key code is a single character such as an alphabet or number or symbol, the alternatives will include other characters that may be on the same key or adjacent keys. These codes are useful to correct for accidental presses of a key adjacent to the intended key.

Attributes

Remarks

Send a key press to the listener.

Java documentation for android.inputmethodservice.KeyboardView.OnKeyboardActionListener.onKey(int, 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