ICoreWindow.KeyDown 事件

定义

按下非系统键时引发的事件。

此事件的委托类型为 TypedEventHandler<TSender,TResult>,其中 TSender 的类型为 CoreWindow,TResult 的类型KeyEventArgs

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

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

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

事件类型

适用于

另请参阅