KeyboardDeliveryInterceptor KeyboardDeliveryInterceptor KeyboardDeliveryInterceptor KeyboardDeliveryInterceptor Class

Definition

Enables an app to override the system processing of raw keyboard input, including key combinations such as shortcut keys, access keys (or hot keys), accelerator keys, and application keys.

The raw keyboard input is intercepted, suppressed, and routed to the app (when in the foreground) for processing.

Note

Secure attention sequence (SAS) key combinations, including Ctrl-Alt-Del and Windows-L, continue to be processed by the system.

public : sealed class KeyboardDeliveryInterceptor : IKeyboardDeliveryInterceptorpublic sealed class KeyboardDeliveryInterceptor : IKeyboardDeliveryInterceptorPublic NotInheritable Class KeyboardDeliveryInterceptor Implements IKeyboardDeliveryInterceptor// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
inputForegroundObservation

Remarks

The value of the RepeatCount property returned by KeyEventArgs.KeyStatus is always 0.

The value of the WasKeyDown property returned by KeyEventArgs.KeyStatus is always false.

If Handled is set to false, an error occurs.

Properties

IsInterceptionEnabledWhenInForeground IsInterceptionEnabledWhenInForeground IsInterceptionEnabledWhenInForeground IsInterceptionEnabledWhenInForeground

Gets or sets whether the app overrides the system processing of raw keyboard input, including key combinations such as shortcut keys, access keys (or hot keys), accelerator keys, and application keys.

The raw keyboard input is intercepted, suppressed, and routed to the app (when in the foreground) for processing.

Note

Secure attention sequence (SAS) key combinations, including Ctrl-Alt-Del and Windows-L, continue to be processed by the system.

public : PlatForm::Boolean IsInterceptionEnabledWhenInForeground { get; set; }public bool IsInterceptionEnabledWhenInForeground { get; set; }Public ReadWrite Property IsInterceptionEnabledWhenInForeground As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

True if the app processes raw keyboard input instead of the system. Otherwise, false.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
inputForegroundObservation

Methods

GetForCurrentView() GetForCurrentView() GetForCurrentView() GetForCurrentView()

Retrieves a KeyboardDeliveryInterceptor object associated with the current app view.

public : static KeyboardDeliveryInterceptor GetForCurrentView()public static KeyboardDeliveryInterceptor GetForCurrentView()Public Static Function GetForCurrentView() As KeyboardDeliveryInterceptor// You can use this method in JavaScript.
Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
inputForegroundObservation

Events

KeyDown KeyDown KeyDown KeyDown

Occurs when a keyboard key is pressed. State info and event data is routed through this event instead of CoreWindow.KeyDown.

public : event TypedEventHandler KeyDown<KeyboardDeliveryInterceptor,  KeyEventArgs>public event TypedEventHandler KeyDown<KeyboardDeliveryInterceptor,  KeyEventArgs>Public Event KeyDown<KeyboardDeliveryInterceptor,  KeyEventArgs>// You can use this event in JavaScript.
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
inputForegroundObservation
See Also

KeyUp KeyUp KeyUp KeyUp

Occurs when a pressed keyboard key is released. State info and event data is routed through this event instead of CoreWindow.KeyUp.

public : event TypedEventHandler KeyUp<KeyboardDeliveryInterceptor,  KeyEventArgs>public event TypedEventHandler KeyUp<KeyboardDeliveryInterceptor,  KeyEventArgs>Public Event KeyUp<KeyboardDeliveryInterceptor,  KeyEventArgs>// You can use this event in JavaScript.
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
inputForegroundObservation
See Also