KeyboardDeliveryInterceptor Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 ref class KeyboardDeliveryInterceptor sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 131072)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class KeyboardDeliveryInterceptor final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 131072)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class KeyboardDeliveryInterceptor
Public NotInheritable Class KeyboardDeliveryInterceptor
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10586.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v2.0)
|
App 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 |
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. |
Methods
GetForCurrentView() |
Retrieves a KeyboardDeliveryInterceptor object associated with the current app view. |
Events
KeyDown |
Occurs when a keyboard key is pressed. State info and event data is routed through this event instead of CoreWindow.KeyDown. |
KeyUp |
Occurs when a pressed keyboard key is released. State info and event data is routed through this event instead of CoreWindow.KeyUp. |