共用方式為


InputKeyboardSource.CharacterReceived 事件

定義

當輸入佇列收到新字元時發生。

// Register
event_token CharacterReceived(TypedEventHandler<InputKeyboardSource, CharacterReceivedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
InputKeyboardSource::CharacterReceived_revoker CharacterReceived(auto_revoke_t, TypedEventHandler<InputKeyboardSource, CharacterReceivedEventArgs const&> const& handler) const;
public event TypedEventHandler<InputKeyboardSource,CharacterReceivedEventArgs> CharacterReceived;
function onCharacterReceived(eventArgs) { /* Your code */ }
inputKeyboardSource.addEventListener("characterreceived", onCharacterReceived);
inputKeyboardSource.removeEventListener("characterreceived", onCharacterReceived);
- or -
inputKeyboardSource.oncharacterreceived = onCharacterReceived;
Public Custom Event CharacterReceived As TypedEventHandler(Of InputKeyboardSource, CharacterReceivedEventArgs) 

事件類型

備註

當啟用輸入法編輯器 (輸入法) 時,應用程式不會收到此事件。 輸入法編輯器 (輸入法) 處理所有鍵盤輸入,並將 [已處理 ] 設定為 true。

適用於

另請參閱

  • <xref:%601>