CharacterReceivedEventArgs CharacterReceivedEventArgs CharacterReceivedEventArgs Class

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

Syntax

Declaration

public sealed class CharacterReceivedEventArgspublic sealed class CharacterReceivedEventArgsPublic NotInheritable Class CharacterReceivedEventArgs

Remarks

Windows 10 Apps do not receive this event when an 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 summary

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

Gets the key code of the character whose input raised the event.

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

Properties

  • Handled
    Handled
    Handled
    Handled

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

    public bool Handled { get; set; }public bool Handled { get; set; }Public ReadWrite Property Handled As bool

    Property Value

    • 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 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 whose input raised the event.

    public uint KeyCode { get; }public uint KeyCode { get; }Public ReadOnly Property KeyCode As uint

    Property Value

    • uint
      uint
      uint

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

    Remarks

    Windows 10 Apps do not receive this event when an 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

    Property Value

    Remarks

    Windows 10 Apps do not receive this event when an 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.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute

Details

Assembly

Windows.UI.Core.dll