IWithKeyDownAndUp

interface

Namespace: Vuplex.WebView

An interface implemented by a webview if it supports separate KeyDown() and KeyUp() methods.

Example

// Dispatch ctrl + shift + right arrow
await webViewPrefab.WaitUntilInitialized();
var webViewWithKeyDownAndUp = webViewPrefab.WebView as IWithKeyDownAndUp;
if (webViewWithKeyDownAndUp != null) {
    webViewWithKeyDownAndUp.KeyDown("ArrowRight", KeyModifier.Control | KeyModifier.Shift);
    webViewWithKeyDownAndUp.KeyUp("ArrowRight", KeyModifier.Control | KeyModifier.Shift);
}

Summary

Public methods

KeyDown

void KeyDown(string key, KeyModifier modifiers)

Dispatches a key down event to the webview.

A key can either be a single character representing a unicode character (e.g. "A", "b", "?") or a JavaScript Key value (e.g. "ArrowUp", "Enter").

KeyUp

void KeyUp(string key, KeyModifier modifiers)

Dispatches a key up event to the webview.