CharacterReceivedEventArgs CharacterReceivedEventArgs CharacterReceivedEventArgs CharacterReceivedEventArgs Class

Definition

Provides the arguments returned by the event raised when a character is received by the input queue.

public : sealed class CharacterReceivedEventArgs : ICharacterReceivedEventArgs, ICoreWindowEventArgspublic sealed class CharacterReceivedEventArgs : ICharacterReceivedEventArgs, ICoreWindowEventArgsPublic NotInheritable Class CharacterReceivedEventArgs Implements ICharacterReceivedEventArgs, ICoreWindowEventArgs// This API is not available in Javascript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Windows 10 Apps do not receive this event when an Input Method Editor (IME) is enabled. The Input Method Editor (IME) handles all keyboard input and sets Handled to true.

Windows Phone This API is supported in native apps only.

This object is returned by a delegate registered for the following event:


// returning character received events data through CharacterReceivedEventArgs

void MyCoreWindowEvents::SetWindow( // implementation called by CoreApplication::Run(), provided for context
    _In_ CoreWindow^ window
    )
{

    // ...
    window->CharacterReceived +=
        ref new TypedEventHandler<CoreWindow^, CharacterReceivedEventArgs^>(this, &CoreWindowEvents::OnCharacterReceived);

    // ...

}
Note

: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX).

Properties

Handled Handled Handled Handled

Gets or sets whether the character-received event was handled or not.

public : PlatForm::Boolean Handled { get; set; }public bool Handled { get; set; }Public ReadWrite Property Handled As bool// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

True if the character received event has been handled; false if it has not.

Remarks

Windows 10 Apps do not receive this event when an Input Method Editor (IME) is enabled. The Input Method Editor (IME) handles all keyboard input and sets Handled to true.

Windows Phone This API is supported in native apps only.

KeyCode KeyCode KeyCode KeyCode

Gets the key code of the character received by the input queue.

public : unsigned int KeyCode { get; }public uint KeyCode { get; }Public ReadOnly Property KeyCode As uint// This API is not available in Javascript.
Value
unsigned int uint uint uint

The character in UTF-32 encoding.

Remarks

Windows 10 Apps do not receive this event when an Input Method Editor (IME) is enabled. The Input Method Editor (IME) handles all keyboard input and sets Handled to true.

Windows Phone This API is supported in native apps only.

KeyStatus KeyStatus KeyStatus KeyStatus

Gets the status of the physical key press that raised the character-received event.

public : CorePhysicalKeyStatus KeyStatus { get; }public CorePhysicalKeyStatus KeyStatus { get; }Public ReadOnly Property KeyStatus As CorePhysicalKeyStatus// This API is not available in Javascript.

Remarks

Windows 10 Apps do not receive this event when an Input Method Editor (IME) is enabled. The Input Method Editor (IME) handles all keyboard input and sets Handled to true.

Windows Phone This API is supported in native apps only.