語言

KeyCharacterMap.Get 方法

定義

多載

名稱 Description
Get(Keycode, MetaKeyStates)

取得由指定金鑰與元金鑰狀態組合產生的 Unicode 字元。

Get(Keycode, Int32)

取得由指定金鑰與元金鑰狀態組合產生的 Unicode 字元。

Get(Keycode, MetaKeyStates)

取得由指定金鑰與元金鑰狀態組合產生的 Unicode 字元。

[Android.Runtime.Register("get", "(II)I", "GetGet_IIHandler")]
public virtual int Get(Android.Views.Keycode keyCode, Android.Views.MetaKeyStates metaState);
[<Android.Runtime.Register("get", "(II)I", "GetGet_IIHandler")>]
abstract member Get : Android.Views.Keycode * Android.Views.MetaKeyStates -> int
override this.Get : Android.Views.Keycode * Android.Views.MetaKeyStates -> int

參數

keyCode
Keycode

鑰匙密碼。

metaState
MetaKeyStates

元鍵修飾狀態。

傳回

該有對應的字元或組合重音,若沒有則為 0。

屬性

備註

取得由指定金鑰與元金鑰狀態組合產生的 Unicode 字元。

回傳指定鍵在指定元位元(參見 MetaKeyKeyListener)啟用時所產生的 Unicode 字元。

若金鑰不是用來輸入 Unicode 字元的鍵,則回傳 0。

如果回傳值有位元 #COMBINING_ACCENT 設定,該金鑰就是一個「死金鑰」,應該與另一個金鑰結合才能產生字元——參見 #getDeadChar ——在用 #COMBINING_ACCENT_MASK遮罩後。

的 android.view.KeyCharacterMap.get(int, int)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

Get(Keycode, Int32)

取得由指定金鑰與元金鑰狀態組合產生的 Unicode 字元。

public int Get(Android.Views.Keycode keyCode, int metaState);
member this.Get : Android.Views.Keycode * int -> int

參數

keyCode
Keycode

鑰匙密碼。

metaState
Int32

一個以整數表示的數值組合 MetaKeyStates 。

傳回

由該鍵產生的 Unicode 字元(碼點),或 0 若鍵不產生字元。

備註

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於