語言

KeyEvent 建構函式

定義

多載

名稱 Description
KeyEvent(KeyEvent)

製作一個現有關鍵事件的精確複製品。

KeyEvent(KeyEventActions, Keycode)

建立一個新的關鍵事件。

KeyEvent(IntPtr, JniHandleOwnership)

用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。

KeyEvent(KeyEvent, Int64, Int32)
已淘汰.

複製一個現有的關鍵事件,修改其時間與重複次數。

KeyEvent(Int64, String, Int32, KeyEventFlags)

為一串字元建立一個新的關鍵事件。

KeyEvent(Int64, Int64, KeyEventActions, Keycode, Int32)

建立一個新的關鍵事件。

KeyEvent(Int64, Int64, KeyEventActions, Keycode, Int32, MetaKeyStates)

建立一個新的關鍵事件。

KeyEvent(Int64, Int64, KeyEventActions, Keycode, Int32, MetaKeyStates, Int32, Int32)

建立一個新的關鍵事件。

KeyEvent(Int64, Int64, KeyEventActions, Keycode, Int32, MetaKeyStates, Int32, Int32, KeyEventFlags)

建立一個新的關鍵事件。

KeyEvent(Int64, Int64, KeyEventActions, Keycode, Int32, MetaKeyStates, Int32, Int32, KeyEventFlags, InputSourceType)

建立一個新的關鍵事件。

KeyEvent(KeyEvent)

製作一個現有關鍵事件的精確複製品。

[Android.Runtime.Register(".ctor", "(Landroid/view/KeyEvent;)V", "")]
public KeyEvent(Android.Views.KeyEvent? origEvent);
[<Android.Runtime.Register(".ctor", "(Landroid/view/KeyEvent;)V", "")>]
new Android.Views.KeyEvent : Android.Views.KeyEvent -> Android.Views.KeyEvent

參數

origEvent
KeyEvent

Android.Views.KeyEvent 值用於原始事件。

屬性

備註

製作一個現有關鍵事件的精確複製品。

的 android.view.KeyEvent.KeyEvent(android.view.KeyEvent)Java 檔。

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

適用於

KeyEvent(KeyEventActions, Keycode)

建立一個新的關鍵事件。

[Android.Runtime.Register(".ctor", "(II)V", "")]
public KeyEvent(Android.Views.KeyEventActions action, Android.Views.Keycode code);
[<Android.Runtime.Register(".ctor", "(II)V", "")>]
new Android.Views.KeyEvent : Android.Views.KeyEventActions * Android.Views.Keycode -> Android.Views.KeyEvent

參數

action
KeyEventActions

動作代碼:或 #ACTION_DOWN#ACTION_UP。

code
Keycode

鑰匙密碼。

屬性

備註

建立一個新的關鍵事件。

的 android.view.KeyEvent.KeyEvent(int, int)Java 檔。

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

適用於

KeyEvent(IntPtr, JniHandleOwnership)

用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。

protected KeyEvent(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Views.KeyEvent : nativeint * Android.Runtime.JniHandleOwnership -> Android.Views.KeyEvent

參數

javaReference
IntPtr

nativeint

IntPtrA 包含一個 Java 原生介面(JNI)物件參考。

transfer
JniHandleOwnership

JniHandleOwnershipA 指示如何處理javaReference

備註

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

適用於

KeyEvent(KeyEvent, Int64, Int32)

警告

deprecated

複製一個現有的關鍵事件,修改其時間與重複次數。

[Android.Runtime.Register(".ctor", "(Landroid/view/KeyEvent;JI)V", "")]
[System.Obsolete("deprecated")]
public KeyEvent(Android.Views.KeyEvent? origEvent, long eventTime, int newRepeat);
[<Android.Runtime.Register(".ctor", "(Landroid/view/KeyEvent;JI)V", "")>]
[<System.Obsolete("deprecated")>]
new Android.Views.KeyEvent : Android.Views.KeyEvent * int64 * int -> Android.Views.KeyEvent

參數

origEvent
KeyEvent

現有的事件要複製。

eventTime
Int64

新的事件時間(in android.os.SystemClock#uptimeMillis)是該事件的。

newRepeat
Int32

這是該活動的新重播數。

屬性

備註

複製一個現有的關鍵事件,修改其時間與重複次數。

此會員已被棄用。 請改用 #changeTimeRepeat(KeyEvent, long, int)。

的 android.view.KeyEvent.KeyEvent(android.view.KeyEvent, long, int)Java 檔。

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

適用於

KeyEvent(Int64, String, Int32, KeyEventFlags)

為一串字元建立一個新的關鍵事件。

[Android.Runtime.Register(".ctor", "(JLjava/lang/String;II)V", "")]
public KeyEvent(long time, string? characters, int deviceId, Android.Views.KeyEventFlags flags);
[<Android.Runtime.Register(".ctor", "(JLjava/lang/String;II)V", "")>]
new Android.Views.KeyEvent : int64 * string * int * Android.Views.KeyEventFlags -> Android.Views.KeyEvent

參數

time
Int64

事件發生的時間(in android.os.SystemClock#uptimeMillis)。

characters
String

一串字元。

deviceId
Int32

產生金鑰事件的裝置 ID。

flags
KeyEventFlags

這場重要事件的旗幟

屬性

備註

為一串字元建立一個新的關鍵事件。 鍵碼、動作、重複次數和來源會自動設定為 #KEYCODE_UNKNOWN、 #ACTION_MULTIPLEInputDevice#SOURCE_KEYBOARD 和 。

的 android.view.KeyEvent.KeyEvent(long, java.lang.String, int, int)Java 檔。

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

適用於

KeyEvent(Int64, Int64, KeyEventActions, Keycode, Int32)

建立一個新的關鍵事件。

[Android.Runtime.Register(".ctor", "(JJIII)V", "")]
public KeyEvent(long downTime, long eventTime, Android.Views.KeyEventActions action, Android.Views.Keycode code, int repeat);
[<Android.Runtime.Register(".ctor", "(JJIII)V", "")>]
new Android.Views.KeyEvent : int64 * int64 * Android.Views.KeyEventActions * Android.Views.Keycode * int -> Android.Views.KeyEvent

參數

downTime
Int64

這個關鍵碼最初失效的時間(in android.os.SystemClock#uptimeMillis)。

eventTime
Int64

事件發生的時間(in android.os.SystemClock#uptimeMillis)。

action
KeyEventActions

動作代碼:或 #ACTION_DOWN#ACTION_UP。

code
Keycode

鑰匙密碼。

repeat
Int32

重複倒數事件(> 若在初始倒數之後則為0),或多場事件計數。

屬性

備註

建立一個新的關鍵事件。

的 android.view.KeyEvent.KeyEvent(long, long, int, int, int)Java 檔。

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

適用於

KeyEvent(Int64, Int64, KeyEventActions, Keycode, Int32, MetaKeyStates)

建立一個新的關鍵事件。

[Android.Runtime.Register(".ctor", "(JJIIII)V", "")]
public KeyEvent(long downTime, long eventTime, Android.Views.KeyEventActions action, Android.Views.Keycode code, int repeat, Android.Views.MetaKeyStates metaState);
[<Android.Runtime.Register(".ctor", "(JJIIII)V", "")>]
new Android.Views.KeyEvent : int64 * int64 * Android.Views.KeyEventActions * Android.Views.Keycode * int * Android.Views.MetaKeyStates -> Android.Views.KeyEvent

參數

downTime
Int64

這個關鍵碼最初失效的時間(in android.os.SystemClock#uptimeMillis)。

eventTime
Int64

事件發生的時間(in android.os.SystemClock#uptimeMillis)。

action
KeyEventActions

動作代碼:或 #ACTION_DOWN#ACTION_UP。

code
Keycode

鑰匙密碼。

repeat
Int32

重複倒數事件(> 若在初始倒數之後則為0),或多場事件計數。

metaState
MetaKeyStates

標示目前正在按哪些元鍵。

屬性

備註

建立一個新的關鍵事件。

的 android.view.KeyEvent.KeyEvent(long, long, int, int, int, int)Java 檔。

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

適用於

KeyEvent(Int64, Int64, KeyEventActions, Keycode, Int32, MetaKeyStates, Int32, Int32)

建立一個新的關鍵事件。

[Android.Runtime.Register(".ctor", "(JJIIIIII)V", "")]
public KeyEvent(long downTime, long eventTime, Android.Views.KeyEventActions action, Android.Views.Keycode code, int repeat, Android.Views.MetaKeyStates metaState, int deviceId, int scancode);
[<Android.Runtime.Register(".ctor", "(JJIIIIII)V", "")>]
new Android.Views.KeyEvent : int64 * int64 * Android.Views.KeyEventActions * Android.Views.Keycode * int * Android.Views.MetaKeyStates * int * int -> Android.Views.KeyEvent

參數

downTime
Int64

這個關鍵碼最初失效的時間(in android.os.SystemClock#uptimeMillis)。

eventTime
Int64

事件發生的時間(in android.os.SystemClock#uptimeMillis)。

action
KeyEventActions

動作代碼:或 #ACTION_DOWN#ACTION_UP。

code
Keycode

鑰匙密碼。

repeat
Int32

重複倒數事件(> 若在初始倒數之後則為0),或多場事件計數。

metaState
MetaKeyStates

標示目前正在按哪些元鍵。

deviceId
Int32

產生金鑰事件的裝置 ID。

scancode
Int32

事件的原始裝置掃描代碼。

屬性

備註

建立一個新的關鍵事件。

的 android.view.KeyEvent.KeyEvent(long, long, int, int, int, int, int, int)Java 檔。

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

適用於

KeyEvent(Int64, Int64, KeyEventActions, Keycode, Int32, MetaKeyStates, Int32, Int32, KeyEventFlags)

建立一個新的關鍵事件。

[Android.Runtime.Register(".ctor", "(JJIIIIIII)V", "")]
public KeyEvent(long downTime, long eventTime, Android.Views.KeyEventActions action, Android.Views.Keycode code, int repeat, Android.Views.MetaKeyStates metaState, int deviceId, int scancode, Android.Views.KeyEventFlags flags);
[<Android.Runtime.Register(".ctor", "(JJIIIIIII)V", "")>]
new Android.Views.KeyEvent : int64 * int64 * Android.Views.KeyEventActions * Android.Views.Keycode * int * Android.Views.MetaKeyStates * int * int * Android.Views.KeyEventFlags -> Android.Views.KeyEvent

參數

downTime
Int64

這個關鍵碼最初失效的時間(in android.os.SystemClock#uptimeMillis)。

eventTime
Int64

事件發生的時間(in android.os.SystemClock#uptimeMillis)。

action
KeyEventActions

動作代碼:或 #ACTION_DOWN#ACTION_UP。

code
Keycode

鑰匙密碼。

repeat
Int32

重複倒數事件(> 若在初始倒數之後則為0),或多場事件計數。

metaState
MetaKeyStates

標示目前正在按哪些元鍵。

deviceId
Int32

產生金鑰事件的裝置 ID。

scancode
Int32

事件的原始裝置掃描代碼。

flags
KeyEventFlags

這場重要事件的旗幟

屬性

備註

建立一個新的關鍵事件。

的 android.view.KeyEvent.KeyEvent(long, long, int, int, int, int, int, int, int)Java 檔。

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

適用於

KeyEvent(Int64, Int64, KeyEventActions, Keycode, Int32, MetaKeyStates, Int32, Int32, KeyEventFlags, InputSourceType)

建立一個新的關鍵事件。

[Android.Runtime.Register(".ctor", "(JJIIIIIIII)V", "")]
public KeyEvent(long downTime, long eventTime, Android.Views.KeyEventActions action, Android.Views.Keycode code, int repeat, Android.Views.MetaKeyStates metaState, int deviceId, int scancode, Android.Views.KeyEventFlags flags, Android.Views.InputSourceType source);
[<Android.Runtime.Register(".ctor", "(JJIIIIIIII)V", "")>]
new Android.Views.KeyEvent : int64 * int64 * Android.Views.KeyEventActions * Android.Views.Keycode * int * Android.Views.MetaKeyStates * int * int * Android.Views.KeyEventFlags * Android.Views.InputSourceType -> Android.Views.KeyEvent

參數

downTime
Int64

這個關鍵碼最初失效的時間(in android.os.SystemClock#uptimeMillis)。

eventTime
Int64

事件發生的時間(in android.os.SystemClock#uptimeMillis)。

action
KeyEventActions

動作代碼:或 #ACTION_DOWN#ACTION_UP。

code
Keycode

鑰匙密碼。

repeat
Int32

重複倒數事件(> 若在初始倒數之後則為0),或多場事件計數。

metaState
MetaKeyStates

標示目前正在按哪些元鍵。

deviceId
Int32

產生金鑰事件的裝置 ID。

scancode
Int32

事件的原始裝置掃描代碼。

flags
KeyEventFlags

這場重要事件的旗幟

source
InputSourceType

輸入來源如 InputDevice#SOURCE_KEYBOARD。

屬性

備註

建立一個新的關鍵事件。

的 android.view.KeyEvent.KeyEvent(long, long, int, int, int, int, int, int, int, int)Java 檔。

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

適用於