共用方式為


InputKeyboardSource.ContextMenuKey 事件

定義

發生于 功能表 虛擬鍵 (或 Shift + F10) 未處理先前 KeyDown 事件時。

// Register
event_token ContextMenuKey(TypedEventHandler<InputKeyboardSource, ContextMenuKeyEventArgs const&> const& handler) const;

// Revoke with event_token
void ContextMenuKey(event_token const* cookie) const;

// Revoke with event_revoker
InputKeyboardSource::ContextMenuKey_revoker ContextMenuKey(auto_revoke_t, TypedEventHandler<InputKeyboardSource, ContextMenuKeyEventArgs const&> const& handler) const;
public event TypedEventHandler<InputKeyboardSource,ContextMenuKeyEventArgs> ContextMenuKey;
function onContextMenuKey(eventArgs) { /* Your code */ }
inputKeyboardSource.addEventListener("contextmenukey", onContextMenuKey);
inputKeyboardSource.removeEventListener("contextmenukey", onContextMenuKey);
- or -
inputKeyboardSource.oncontextmenukey = onContextMenuKey;
Public Custom Event ContextMenuKey As TypedEventHandler(Of InputKeyboardSource, ContextMenuKeyEventArgs) 

事件類型

備註

此事件不會針對從其他硬體裝置產生的操作功能表事件引發,例如滑鼠或手寫筆。

適用於

另請參閱

  • <xref:%601>