Compartilhar via


KeyEvent.KeyCodeToString(Keycode) Method

Definition

Returns a string that represents the symbolic name of the specified keycode such as "KEYCODE_A", "KEYCODE_DPAD_UP", or an equivalent numeric constant such as "1001" if unknown.

[Android.Runtime.Register("keyCodeToString", "(I)Ljava/lang/String;", "")]
public static string? KeyCodeToString (Android.Views.Keycode keyCode);
[<Android.Runtime.Register("keyCodeToString", "(I)Ljava/lang/String;", "")>]
static member KeyCodeToString : Android.Views.Keycode -> string

Parameters

keyCode
Keycode

The key code.

Returns

The symbolic name of the specified keycode.

Attributes

Remarks

Returns a string that represents the symbolic name of the specified keycode such as "KEYCODE_A", "KEYCODE_DPAD_UP", or an equivalent numeric constant such as "1001" if unknown.

This function is intended to be used mostly for debugging, logging, and testing. It is not locale-specific and is not intended to be used in a user-facing manner.

Java documentation for android.view.KeyEvent.keyCodeToString(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

See also