Android.Views.KeyCharacterMap.GetNumber Method
Gets the number or symbol associated with the key.

Syntax

[Android.Runtime.Register("getNumber", "(I)C", "GetGetNumber_IHandler")]
public virtual char GetNumber ([Android.Runtime.GeneratedEnum] Keycode keyCode)

Parameters

keyCode
The key code.

Returns

Documentation for this section has not yet been entered.

Remarks

Gets the number or symbol associated with the key.

The character value is returned, not the numeric value. If the key is not a number, but is a symbol, the symbol is retuned.

This method is intended to to support dial pads and other numeric or symbolic entry on keyboards where certain keys serve dual function as alphabetic and symbolic keys. This method returns the number or symbol associated with the key independent of whether the user has pressed the required modifier.

For example, on one particular keyboard the keys on the top QWERTY row generate numbers when ALT is pressed such that ALT-Q maps to '1'. So for that keyboard when KeyCharacterMap.GetNumber(Keycode) is called with KeyEvent.KEYCODE_Q it returns '1' so that the user can type numbers without pressing ALT when it makes sense.

[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