다음을 통해 공유


IMenu.PerformShortcut(Keycode, KeyEvent, MenuPerformFlags) Method

Definition

Execute the menu item action associated with the given shortcut character.

[Android.Runtime.Register("performShortcut", "(ILandroid/view/KeyEvent;I)Z", "GetPerformShortcut_ILandroid_view_KeyEvent_IHandler:Android.Views.IMenuInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool PerformShortcut (Android.Views.Keycode keyCode, Android.Views.KeyEvent? e, Android.Views.MenuPerformFlags flags);
[<Android.Runtime.Register("performShortcut", "(ILandroid/view/KeyEvent;I)Z", "GetPerformShortcut_ILandroid_view_KeyEvent_IHandler:Android.Views.IMenuInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member PerformShortcut : Android.Views.Keycode * Android.Views.KeyEvent * Android.Views.MenuPerformFlags -> bool

Parameters

keyCode
Keycode

The keycode of the shortcut key.

e
KeyEvent

Key event message.

flags
MenuPerformFlags

Additional option flags or 0.

Returns

If the given shortcut exists and is shown, returns true; else returns false.

Attributes

Remarks

Execute the menu item action associated with the given shortcut character.

Java documentation for android.view.Menu.performShortcut(int, android.view.KeyEvent, 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