CoreWebView2AcceleratorKeyPressedEventArgs.Handled Property

Definition

Indicates whether the AcceleratorKeyPressed event is handled by host.

public bool Handled { get; set; }
member this.Handled : bool with get, set
Public Property Handled As Boolean

Property Value

Remarks

For browser accelerator keys, when an accelerator key is pressed, the propagation and processing order is:

1. A CoreWebView2Controller.AcceleratorKeyPressed event is raised 1. WebView2 browser feature accelerator key handling 1. Web Content Handling: If the key combination isn't reserved for browser actions, the key event propagates to the web content, where JavaScript event listeners can capture and respond to it.

If `Handled` property is set to true anywhere along the path, the event propagation stops, and web content will not receive the key and this prevents the WebView from performing the default action for this accelerator key. Otherwise the WebView will perform the default action for the accelerator key.

Applies to