مشاركة عبر


AcceleratorKeyEventArgs Class

Definition

Provides the arguments returned by an accelerator key event callback.

public ref class AcceleratorKeyEventArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class AcceleratorKeyEventArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class AcceleratorKeyEventArgs
Public NotInheritable Class AcceleratorKeyEventArgs
Inheritance
Object Platform::Object IInspectable AcceleratorKeyEventArgs
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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.

Version history

Windows version SDK version Value added
1607 14393 DeviceId

Properties

DeviceId

Gets a unique ID for the input device that generated this key event.

Use DeviceId to differentiate between devices that can generate key events, such as multiple game controllers.

DeviceId is not supported for all input devices.

EventType

Gets the type of the accelerator key event that invoked the callback.

Handled

Gets or sets whether the accelerator key event was handled or not.

KeyStatus

Gets the status of the accelerator key for which the event was raised.

VirtualKey

Gets the virtual key code (or ASCII/unicode character code depending on the EventType) for the accelerator key event.

Applies to

See also