KeyboardDeliveryInterceptor.KeyDown 事件

定义

按下键盘键时发生。 状态信息和事件数据通过此事件路由,而不是 通过 CoreWindow.KeyDown 路由。

// Register
event_token KeyDown(TypedEventHandler<KeyboardDeliveryInterceptor, KeyEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
KeyboardDeliveryInterceptor::KeyDown_revoker KeyDown(auto_revoke_t, TypedEventHandler<KeyboardDeliveryInterceptor, KeyEventArgs const&> const& handler) const;
public event TypedEventHandler<KeyboardDeliveryInterceptor,KeyEventArgs> KeyDown;
function onKeyDown(eventArgs) { /* Your code */ }
keyboardDeliveryInterceptor.addEventListener("keydown", onKeyDown);
keyboardDeliveryInterceptor.removeEventListener("keydown", onKeyDown);
- or -
keyboardDeliveryInterceptor.onkeydown = onKeyDown;
Public Custom Event KeyDown As TypedEventHandler(Of KeyboardDeliveryInterceptor, KeyEventArgs) 

事件类型

Windows 要求

应用功能
inputForegroundObservation

适用于

另请参阅