onAcceleratorKeyPressed method
This event runs when an accelerator key or key combo is pressed or
released while the WebView is focused.
To listen this event, InAppWebViewSettings.handleAcceleratorKeyPressed must be true.
A key is considered an accelerator if either of the following conditions are true:
CtrlorAltis currently being held.- The pressed key does not map to a character.
A few specific keys are never considered accelerators, such as Shift.
The Escape key is always considered an accelerator.
Auto-repeated key events caused by holding the key down also triggers this event.
Filter out the auto-repeated key events by verifying the AcceleratorKeyPressedDetail.physicalKeyStatus property.
Officially Supported Platforms/Implementations:
- Windows WebView2 (Official API - ICoreWebView2Controller.add_AcceleratorKeyPressed)
Parameters - Officially Supported Platforms/Implementations:
detail: all platforms
Use the PlatformInAppBrowserEvents.isMethodSupported method to check if this method is supported at runtime.
Implementation
@override
void onAcceleratorKeyPressed(AcceleratorKeyPressedDetail detail) {}